Skip to content

CI/CD Pipeline

The puppeteer-mcp project uses a comprehensive automated release pipeline built with GitHub Actions. This pipeline ensures code quality, security, and reliable releases.

Workflow: .github/workflows/ci-enhanced.yml

  • Triggers: Push to main/develop, Pull requests, Merge groups
  • Features:
    • Multi-version Node.js testing (20.x, 22.x)
    • Code quality checks (ESLint, TypeScript, Prettier)
    • Comprehensive test suite (unit, integration, acceptance)
    • Security scanning (Trivy, npm audit)
    • Performance benchmarks
    • Docker image validation
    • Breaking change detection

Workflow: .github/workflows/release-automated.yml

  • Triggers: Manual workflow dispatch
  • Features:
    • Semantic versioning with automatic version bumping
    • Changelog generation from commit messages
    • Release candidate testing
    • NPM package publishing
    • Docker image building and pushing
    • GitHub release creation
    • Documentation updates

Workflow: .github/workflows/dependency-updates.yml

  • Triggers: Weekly schedule (Mondays 9 AM UTC), Manual dispatch
  • Features:
    • Automated dependency analysis
    • Security vulnerability patching
    • Grouped update PRs
    • Test validation before merging

Workflow: .github/workflows/hotfix.yml

  • Triggers: Manual dispatch for critical issues
  • Features:
    • Fast-track critical fixes
    • Isolated testing environment
    • Automatic backporting
    • Rollback procedures

Workflow: .github/workflows/performance-monitoring.yml

  • Triggers: Push to main/develop, PRs, Daily schedule
  • Features:
    • Startup time benchmarks
    • Browser pool performance
    • Memory usage tracking
    • API response time monitoring
    • Historical trend analysis

Workflow: .github/workflows/docs-update.yml

  • Triggers: Code changes, Release events, Manual dispatch
  • Features:
    • API documentation generation
    • Guide updates
    • Starlight site building
    • GitHub Pages deployment

Run the release checklist to ensure everything is ready:

Terminal window
npm run release:checklist

This validates:

  • All tests passing
  • No security vulnerabilities
  • Documentation updated
  • Version consistency
  • Clean git state
  1. Go to GitHub Actions
  2. Select “Automated Release Pipeline”
  3. Click “Run workflow”
  4. Choose release type (patch/minor/major)
  5. Review and approve the generated PR
Terminal window
# Dry run to preview changes
npm run release:dry-run
# Create release
npm run release # Auto-detect version bump
npm run release:patch # Patch release (1.0.0 → 1.0.1)
npm run release:minor # Minor release (1.0.0 → 1.1.0)
npm run release:major # Major release (1.0.0 → 2.0.0)

For beta/alpha releases:

Terminal window
npm run release:prerelease -- --prerelease beta

For critical issues in production:

  1. Trigger the hotfix workflow
  2. Specify the affected version
  3. Describe the issue
  4. The workflow will:
    • Create a hotfix branch
    • Run isolated tests
    • Deploy the fix
    • Merge back to main/develop

If a release causes issues:

Terminal window
npm run release:rollback

This will:

  1. List recent releases
  2. Let you select a version to rollback to
  3. Deprecate the problematic version on NPM
  4. Re-publish the previous version as latest
  5. Create documentation about the rollback

We follow Semantic Versioning:

  • MAJOR: Breaking changes (feat!: or BREAKING CHANGE:)
  • MINOR: New features (feat:)
  • PATCH: Bug fixes (fix:)
type(scope): subject
body
footer

Types:

TypeDescription
featNew feature
fixBug fix
docsDocumentation changes
styleCode style changes
refactorCode refactoring
perfPerformance improvements
testTest changes
buildBuild system changes
ciCI/CD changes
choreOther changes
  • Trivy: Container and filesystem vulnerability scanning
  • npm audit: Dependency vulnerability checking
  • CodeQL: Static code analysis
  • OWASP Dependency Check: Additional vulnerability detection
  • Startup time
  • Browser pool initialization
  • Memory usage
  • API response times
  • Bundle size
MetricThreshold
Startup time< 5 seconds
Memory usage< 512MB
API response< 100ms average
Bundle size< 50MB

All PRs must pass:

  1. All test suites
  2. TypeScript compilation
  3. ESLint (no errors)
  4. Security scans
  5. Performance benchmarks
  • Code coverage (target: 80%)
  • Documentation generation
  • Bundle size analysis

After each release:

  1. NPM package availability check
  2. Docker image pull verification
  3. Installation testing
  4. Performance baseline comparison
  • GitHub Issues for release reports
  • PR comments with benchmark results
  • Release notifications in GitHub

Enable debug logging in workflows:

env:
ACTIONS_STEP_DEBUG: true
ACTIONS_RUNNER_DEBUG: true
ScriptDescription
npm run release:checklistRun pre-release validations
npm run releaseCreate a new release
npm run release:dry-runPreview release changes
npm run release:rollbackRollback to previous version
npm run changelogGenerate changelog
npm run version:checkCheck version consistency
npm run security:checkRun security validations
SecretPurpose
NPM_TOKENNPM authentication token
DOCKER_USERNAMEDocker Hub username
DOCKER_PASSWORDDocker Hub password
CODECOV_TOKENCodecov integration token
APP_IDGitHub App ID for automated PRs
APP_PRIVATE_KEYGitHub App private key
  • Review dependency updates
  • Check performance trends
  • Review security alerts
  • Audit CI/CD pipeline performance
  • Review and update documentation
  • Clean up old artifacts
  • Review rollback history
  • Review and update security policies
  • Performance baseline updates
  • CI/CD pipeline optimization
  • Dependency major version updates

The CI/CD pipeline provides enterprise-grade automation ensuring code quality, security, and reliable releases. With comprehensive validation stages, automated rollback capabilities, and continuous monitoring, the pipeline maintains high standards for production deployments while enabling rapid development cycles.