GitHub Actions gives you 2,000 free CI/CD minutes per month. But most developers only use it for basic tests. Here are workflows you should be running.
1. Auto-label PRs by file path
name: Auto Label
on: [pull_request]
jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
Changes in src/api/? Auto-labeled backend. Changes in src/components/? Auto-labeled frontend.
2. Dependency update PRs
# .github/dependabot.yml
version: 2
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 10
Dependabot creates PRs for outdated packages. Merge with one click.
3. Deploy preview on every PR
name: Preview
on: pull_request
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SA }}
channelId: live
Every PR gets a unique preview URL. Reviewers test without checking out.
4. Lighthouse CI on every PR
- name: Lighthouse
uses: treosh/lighthouse-ci-action@v11
with:
urls: |
https://preview-url.web.app/
budgetPath: ./budget.json
Performance regression in a PR? Lighthouse catches it before merge.
5. Release automation
name: Release
on:
push:
tags: ['v*']
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci && npm run build
- uses: softprops/action-gh-release@v1
with:
files: dist/*
generate_release_notes: true
Push a tag → build → create GitHub Release with auto-generated changelog.
6. Scheduled tasks (cron)
on:
schedule:
- cron: '0 9 * * 1' # Every Monday at 9 AM
Weekly dependency audits, stale issue cleanup, metrics collection.
7. Matrix builds
strategy:
matrix:
node-version: [18, 20, 22]
os: [ubuntu-latest, windows-latest, macos-latest]
Test across 9 combinations in parallel. Free.
If you're only using GitHub Actions for npm test — you're using 10% of its power.
Need web scraping or data extraction? Check out my tools on Apify — get structured data from any website in minutes.
Custom solution? Email spinov001@gmail.com — quote in 2 hours.
Top comments (0)