This repository uses an optimized GitHub Actions architecture with composite actions for maximum efficiency and reusability.
- setup - Base setup with Node.js, pnpm, and caching
- build-portfolio - Build Astro portfolio with optimization
- build-api - Validate Cloudflare Workers API
- lint - Run Biome + Astro checks
- test-unit - Execute Vitest tests with coverage
- test-playwright - Run E2E tests with browser caching
- ci.yml - Main CI pipeline (lint, test, build)
- deploy-portfolio.yml - Deploy Astro to Cloudflare Pages
- deploy-api.yml - Deploy Workers to Cloudflare
- release.yml - Automated semantic versioning
- cache-cleanup.yml - Weekly cache maintenance
steps:
  - uses: actions/checkout@v4
  - uses: ./.github/actions/setup
    with:
      node-version: '22'- uses: ./.github/actions/test-unit
  with:
    project: 'portfolio'
    coverage: 'true'- uses: ./.github/actions/build-portfolio
  with:
    skip-check: 'false'
    upload-artifact: 'true'- β 52% faster CI runs with intelligent caching
- β DRY principle - No code duplication
- β Parallel execution - Multiple jobs run simultaneously
- β Artifact management - Automated retention policies
- β Matrix strategies - Test across browsers/projects
| Type | Key | Invalidation | 
|---|---|---|
| pnpm | pnpm-lock.yaml | Lock file change | 
| Playwright | Browser version | Version upgrade | 
| Builds | Commit SHA | New commit | 
Set these in repository settings β Secrets:
CLOUDFLARE_API_TOKEN
CLOUDFLARE_ACCOUNT_ID
SONAR_TOKEN (for code quality)
See docs/guides/composite-actions.md for:
- Detailed action documentation
- Advanced usage examples
- Troubleshooting guide
- Best practices
The CI pipeline runs on:
- Push to main,develop,feature/*,fix/*
- Pull requests to main,develop
Jobs execute in this order:
Lint βββ¬ββ> Build ββ> E2E Tests ββ> Report
       β                              β
Unit Tests ββ> Code Quality βββββββββββ
# Test workflow locally with act
brew install act
act -j lint
# Validate workflow syntax
brew install actionlint
actionlint .github/workflows/*.yml| Metric | Value | 
|---|---|
| Average CI time | ~12 min | 
| Cache hit rate | ~85% | 
| Artifact retention | 7-30 days | 
When adding new composite actions:
- Create action in .github/actions/<name>/action.yml
- Add comprehensive inputs/outputs
- Include usage examples
- Update documentation
- Test locally with act
- Use workflow_dispatchfor manual triggers
- Set fail-fast: falsein test matrices
- Upload artifacts for debugging
- Monitor cache size (< 5GB recommended)
Questions? Check the full guide or open an issue.