This repository contains reusable GitHub Actions workflows for common deployment and automation tasks.
A comprehensive Hugo deployment workflow that builds and deploys Hugo sites to AWS S3 with CloudFront invalidation.
Features:
- Hugo build with caching
- AWS S3 sync with proper ACLs
- CloudFront cache invalidation
- Automatic cleanup
Inputs:
website_repository(required): The repository containing the Hugo sites3_bucket_name(required): S3 bucket name for deploymentcloudfront_distribution_id(required): CloudFront distribution ID for cache invalidationdebug(optional): Enable debug mode for verbose output (default: false)
Secrets:
aws_access_key_id(required): AWS access key for S3 and CloudFront operationsaws_secret_access_key(required): AWS secret key for S3 and CloudFront operationsaccess_token(required): GitHub token for repository checkout
A reusable workflow for running Lighthouse performance audits on websites. Designed to be run on a schedule or manually, separate from deployment workflows.
Features:
- Lighthouse CI performance auditing
- Performance budget testing
- Artifact uploads
- Temporary public storage for reports
Inputs:
site_meta_url(required): Base URL of the site to auditbudget_path(optional): Path to budget.json file (default: "./budget.json")upload_artifacts(optional): Upload results as artifacts (default: true)temporary_public_storage(optional): Upload report to temporary public storage (default: true)
Secrets:
- None required
Generates diagrams from Mermaid source files and commits them to the repository.
Features:
- Mermaid diagram generation
- Automatic commit of generated images
- Support for multiple diagram formats
name: Deploy Website
on:
push:
branches: [main]
jobs:
deploy:
uses: jeffabailey/reusable-workflows/.github/workflows/hugo-deploy.yml@master
with:
website_repository: owner/repo-name
s3_bucket_name: "my-bucket"
cloudfront_distribution_id: "E1234567890ABC"
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
access_token: ${{ secrets.ACCESS_TOKEN }}name: Lighthouse Audit
on:
schedule:
# Run daily at 2 AM UTC
- cron: '0 2 * * *'
workflow_dispatch: # Allow manual triggering
jobs:
lighthouse:
uses: jeffabailey/reusable-workflows/.github/workflows/lighthouse-audit.yml@master
with:
site_meta_url: "https://jeffbailey.us"
budget_path: "./budget.json" # Optional# Install act for local testing
brew install act
# Test workflows locally
act -n --workflows .github/workflows/hugo-deploy.ymlBefore using these workflows, ensure all required secrets are defined in your repository settings:
AWS_ACCESS_KEY_ID: AWS access keyAWS_SECRET_ACCESS_KEY: AWS secret keyACCESS_TOKEN: GitHub personal access token
These workflows use the following actions:
aws-actions/configure-aws-credentials@v4actions/checkout@v4actions/cache@v3peaceiris/[email protected]treosh/lighthouse-ci-action@v12rtCamp/action-cleanup@master
When updating these workflows:
- Test changes locally with
act - Update version tags if making breaking changes
- Update documentation for any new inputs or secrets
- Test with dependent repositories
- Use semantic versioning for workflow tags
- Maintain backward compatibility when possible
- Document breaking changes in release notes
When contributing to these workflows:
- Test changes thoroughly with
act - Update documentation for any new features
- Ensure all required secrets are documented
- Follow GitHub Actions best practices