Skip to content

A github action to generate Google PageSpeed Insights based Badges

Notifications You must be signed in to change notification settings

Imamiland/pagespeed-insights-badge-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PageSpeed Insights GitHub Action

GitHub semantic-release REUSE status

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.

Features

  • 🚀 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

Usage

name: Performance Analysis
uses: yourusername/pagespeed-insights-action@v1
with:
  url: 'https://example.com'
  gist-token: ${{ secrets.GIST_TOKEN }}

Inputs

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

Outputs

Name Description
performance-score Overall performance score
report-url URL to detailed report
badge-url URL to generated badge

Example Configuration

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 }}

Development Status

This project is currently under active development. See our ROADMAP.md for planned features and timeline.

Contributing

Contributions are welcome! Please read our Contributing Guidelines before submitting a pull request.

Requirements

  • Node.js 20+
  • GitHub token with Gist permissions
  • Google PageSpeed Insights API key (optional)

Local Development

# Install dependencies
pnpm install

# Run tests
pnpm test

# Build
pnpm build

# Lint
pnpm lint

License

This project is licensed under the MIT License - see the LICENSE file for details.

Credits

Support

If you encounter any issues or have questions, please open an issue.

Security

See SECURITY.md for reporting security vulnerabilities.


This action is not affiliated with or endorsed by Google PageSpeed Insights.

About

A github action to generate Google PageSpeed Insights based Badges

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published