A GitHub Action that analyzes web performance using Google PageSpeed Insights, stores the results, and generates dynamic performance badges. Perfect for monitoring website performance metrics and displaying them directly in your repository.
- 🚀 Automated PageSpeed Insights analysis
- 📊 Performance trend tracking
- 🏷️ Dynamic badge generation for shields.io
- 💾 Efficient data caching via GitHub Gists
- 📈 Historical performance data tracking
- 🎯 Customizable performance thresholds
- 📝 Comprehensive performance reports
name: Performance Analysis
uses: yourusername/pagespeed-insights-action@v1
with:
url: 'https://example.com'
gist-token: ${{ secrets.GIST_TOKEN }}
Name | Description | Required | Default |
---|---|---|---|
url |
URL to analyze | Yes | N/A |
gist-token |
GitHub token with Gist permissions | Yes | N/A |
badge-style |
Style for generated badges | No | 'flat' |
threshold-performance |
Minimum performance score | No | 90 |
Name | Description |
---|---|
performance-score |
Overall performance score |
report-url |
URL to detailed report |
badge-url |
URL to generated badge |
name: Website Performance
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: yourusername/pagespeed-insights-action@v1
with:
url: 'https://example.com'
gist-token: ${{ secrets.GIST_TOKEN }}
This project is currently under active development. See our ROADMAP.md for planned features and timeline.
Contributions are welcome! Please read our Contributing Guidelines before submitting a pull request.
- Node.js 20+
- GitHub token with Gist permissions
- Google PageSpeed Insights API key (optional)
# Install dependencies
pnpm install
# Run tests
pnpm test
# Build
pnpm build
# Lint
pnpm lint
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions, please open an issue.
See SECURITY.md for reporting security vulnerabilities.
This action is not affiliated with or endorsed by Google PageSpeed Insights.