[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7371ZVC4NB4B958YASETN6Y":3,"skill-same:01M7371ZVC4NB4B958YASETN6Y":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M7371ZVC4NB4B958YASETN6Y","build-ci-cd-pipeline",null,"Design and implement multi-stage CI\u002FCD pipelines using GitHub Actions with matrix builds, dependency caching, artifact management, and secret handling. Create workflows that span linting, testing, building, and deployment stages with parallel execution and conditional logic. Use when setting up automated testing and deployment for a new project, migrating from Jenkins or CircleCI to GitHub Actions, implementing matrix builds across platforms, adding build caching, or creating multi-stage pipelines with security scanning and quality gates.","roohe\u002Fagentic-super-skills","roohe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99054084?v=4","01M734WCDFP6RZVT5CNM00QR26","01M734WCE4BD0T4NZS5PCV9V5F",10,"MIT","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fbuild-ci-cd-pipeline\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: build-ci-cd-pipeline\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-04-19\"\ndescription: >\n  Design and implement multi-stage CI\u002FCD pipelines using GitHub Actions with matrix builds,\n  dependency caching, artifact management, and secret handling. Create workflows that span\n  linting, testing, building, and deployment stages with parallel execution and conditional\n  logic. Use when setting up automated testing and deployment for a new project, migrating\n  from Jenkins or CircleCI to GitHub Actions, implementing matrix builds across platforms,\n  adding build caching, or creating multi-stage pipelines with security scanning and quality\n  gates.\nlicense: MIT\nallowed-tools: Read Write Edit Bash Grep Glob\nmetadata:\n  author: Philipp Thoss\n  version: \"1.0\"\n  domain: devops\n  complexity: intermediate\n  language: multi\n  tags: ci-cd, github-actions, pipeline, automation, testing\n---\n\n# Build CI\u002FCD Pipeline\n\nDesign and implement production-grade continuous integration and deployment pipelines with GitHub Actions.\n\n## When to Use\n\n- Setting up automated testing and deployment for a new project\n- Migrating from Jenkins, Travis CI, or CircleCI to GitHub Actions\n- Implementing matrix builds across multiple platforms or language versions\n- Adding build caching to speed up CI\u002FCD execution time\n- Creating multi-stage pipelines with environment-specific deployments\n- Implementing security scanning and code quality gates\n\n## Inputs\n\n- **Required**: Repository with code to test\u002Fbuild\u002Fdeploy\n- **Required**: GitHub Actions workflow directory (`.github\u002Fworkflows\u002F`)\n- **Optional**: Secrets for deployment targets (AWS, Azure, Docker registries)\n- **Optional**: Self-hosted runner configuration for specialized builds\n- **Optional**: Branch protection rules and required status checks\n\n## Procedure\n\n### Step 1: Create Base Workflow Structure\n\nCreate `.github\u002Fworkflows\u002Fci.yml` with trigger configuration and basic job structure.\n\n```yaml\nname: CI Pipeline\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-04-19\"\n\non:\n  push:\n    branches: [main, develop]\n  pull_request:\n    branches: [main, develop]\n  workflow_dispatch:  # Manual trigger\n\nenv:\n  NODE_VERSION: '18'\n  REGISTRY: ghcr.io\n  IMAGE_NAME: ${{ github.repository }}\n\njobs:\n  lint:\n    name: Lint Code\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout code\n        uses: actions\u002Fcheckout@v4\n\n      - name: Setup Node.js\n        uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ env.NODE_VERSION }}\n          cache: 'npm'\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Run ESLint\n        run: npm run lint\n\n      - name: Check formatting\n        run: npm run format:check\n```\n\n**Got:** Workflow file created with proper YAML syntax, triggers configured, and basic lint job defined.\n\n**If fail:** Validate YAML syntax with `yamllint .github\u002Fworkflows\u002Fci.yml`. Check indentation (use spaces, not tabs). Verify action versions are current by checking GitHub Marketplace.\n\n### Step 2: Implement Matrix Build Strategy\n\nAdd matrix builds to test across multiple platforms, language versions, or configurations.\n\n```yaml\n  test:\n    name: Test (${{ matrix.os }}, Node ${{ matrix.node }})\n    runs-on: ${{ matrix.os }}\n    needs: lint\n    strategy:\n      fail-fast: false  # Continue testing other matrix combinations on failure\n      matrix:\n        os: [ubuntu-latest, windows-latest, macos-latest]\n        node: ['16', '18', '20']\n        exclude:\n          - os: macos-latest\n            node: '16'  # Skip old Node on macOS\n\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Setup Node.js ${{ matrix.node }}\n        uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ matrix.node }}\n          cache: 'npm'\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Run tests with coverage\n        run: npm run test:coverage\n\n      - name: Upload coverage to Codecov\n        uses: codecov\u002Fcodecov-action@v3\n        if: matrix.os == 'ubuntu-latest' && matrix.node == '18'\n        with:\n          token: ${{ secrets.CODECOV_TOKEN }}\n          files: .\u002Fcoverage\u002Flcov.info\n          fail_ci_if_error: true\n```\n\n**Got:** Matrix generates 8 parallel jobs (3 OS × 3 Node versions - 1 exclusion). All tests pass across platforms. Coverage report uploads from single canonical job.\n\n**If fail:** If matrix syntax errors occur, verify proper indentation and array notation. For flaky tests, add retry logic with `uses: nick-invision\u002Fretry@v2`. For platform-specific failures, add OS conditionals or expand exclusions.\n\n### Step 3: Configure Dependency Caching and Artifact Management\n\nOptimize build speed with intelligent caching and preserve build artifacts.\n\n```yaml\n  build:\n    name: Build Application\n    runs-on: ubuntu-latest\n    needs: test\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Setup Node.js\n        uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ env.NODE_VERSION }}\n          cache: 'npm'\n\n      - name: Cache build output\n        uses: actions\u002Fcache@v3\n        with:\n          path: |\n            .next\u002Fcache\n            dist\u002F\n            build\u002F\n          key: ${{ runner.os }}-build-${{ hashFiles('**\u002Fpackage-lock.json') }}-${{ hashFiles('**\u002F*.ts', '**\u002F*.tsx') }}\n          restore-keys: |\n            ${{ runner.os }}-build-${{ hashFiles('**\u002Fpackage-lock.json') }}-\n            ${{ runner.os }}-build-\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Build application\n        run: npm run build\n        env:\n          NODE_ENV: production\n\n      - name: Upload build artifacts\n        uses: actions\u002Fupload-artifact@v3\n        with:\n          name: dist-${{ github.sha }}\n          path: |\n            dist\u002F\n            build\u002F\n          retention-days: 7\n          if-no-files-found: error\n```\n\n**Got:** First run downloads dependencies (slow), subsequent runs restore from cache (fast). Build artifacts upload successfully with unique SHA-based naming.\n\n**If fail:** If cache misses frequently, verify cache key includes all relevant file hashes. For upload failures, check path exists and glob patterns match actual build output. Verify `retention-days` meets organizational policies.\n\n### Step 4: Implement Security Scanning and Quality Gates\n\nAdd security vulnerability scanning and code quality enforcement.\n\n```yaml\n  security:\n    name: Security Scan\n    runs-on: ubuntu-latest\n    needs: lint\n    permissions:\n      security-events: write  # Required for uploading SARIF results\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Run Trivy vulnerability scanner\n        uses: aquasecurity\u002Ftrivy-action@master\n        with:\n          scan-type: 'fs'\n          scan-ref: '.'\n          format: 'sarif'\n          output: 'trivy-results.sarif'\n          severity: 'CRITICAL,HIGH'\n\n      - name: Upload Trivy results to GitHub Security\n        uses: github\u002Fcodeql-action\u002Fupload-sarif@v2\n        if: always()  # Upload even if scan finds vulnerabilities\n        with:\n          sarif_file: 'trivy-results.sarif'\n\n      - name: Dependency audit\n        run: npm audit --audit-level=high\n        continue-on-error: true  # Don't fail build, but show warnings\n\n      - name: Check for leaked secrets\n        uses: trufflesecurity\u002Ftrufflehog@main\n        with:\n          path: .\u002F\n          base: ${{ github.event.repository.default_branch }}\n          head: HEAD\n```\n\n**Got:** Security scans complete, results upload to GitHub Security tab. Critical vulnerabilities block merge if branch protection configured. No secrets detected in commits.\n\n**If fail:** For false positives, create `.trivyignore` file with CVE IDs and justifications. For audit failures, review `npm audit fix` suggestions. For secret detection false positives, add patterns to `.trufflehog.yml` exclude list.\n\n### Step 5: Configure Environment-Specific Deployments\n\nSet up deployment stages with environment protection rules and approval gates.\n\n```yaml\n  deploy-staging:\n    name: Deploy to Staging\n    runs-on: ubuntu-latest\n    needs: [build, security]\n    if: github.ref == 'refs\u002Fheads\u002Fdevelop'\n    environment:\n      name: staging\n      url: https:\u002F\u002Fstaging.example.com\n    steps:\n      - name: Download build artifacts\n        uses: actions\u002Fdownload-artifact@v3\n        with:\n          name: dist-${{ github.sha }}\n          path: .\u002Fdist\n\n      - name: Configure AWS credentials\n        uses: aws-actions\u002Fconfigure-aws-credentials@v4\n        with:\n          role-to-assume: ${{ secrets.AWS_ROLE_STAGING }}\n          aws-region: us-east-1\n\n      - name: Deploy to S3\n        run: |\n          aws s3 sync .\u002Fdist s3:\u002F\u002F${{ secrets.S3_BUCKET_STAGING }} --delete\n          aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DIST_STAGING }} --paths \"\u002F*\"\n\n  deploy-production:\n    name: Deploy to Production\n    runs-on: ubuntu-latest\n    needs: [build, security]\n    if: github.ref == 'refs\u002Fheads\u002Fmain'\n    environment:\n      name: production\n      url: https:\u002F\u002Fexample.com\n    steps:\n      - name: Download build artifacts\n        uses: actions\u002Fdownload-artifact@v3\n        with:\n          name: dist-${{ github.sha }}\n          path: .\u002Fdist\n\n      - name: Configure AWS credentials\n        uses: aws-actions\u002Fconfigure-aws-credentials@v4\n        with:\n          role-to-assume: ${{ secrets.AWS_ROLE_PRODUCTION }}\n          aws-region: us-east-1\n\n      - name: Deploy to S3 with blue-green\n        run: |\n          # Deploy to new version\n          aws s3 sync .\u002Fdist s3:\u002F\u002F${{ secrets.S3_BUCKET_PRODUCTION }}\u002Freleases\u002F${{ github.sha }} --delete\n\n          # Update symlink to new version\n          aws s3 cp s3:\u002F\u002F${{ secrets.S3_BUCKET_PRODUCTION }}\u002Freleases\u002F${{ github.sha }} s3:\u002F\u002F${{ secrets.S3_BUCKET_PRODUCTION }}\u002Fcurrent --recursive\n\n          # Invalidate CloudFront\n          aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DIST_PRODUCTION }} --paths \"\u002F*\"\n\n      - name: Create GitHub Release\n        uses: softprops\u002Faction-gh-release@v1\n        if: startsWith(github.ref, 'refs\u002Ftags\u002F')\n        with:\n          files: .\u002Fdist\u002F**\u002F*\n          generate_release_notes: true\n```\n\n**Got:** Staging deploys automatically on develop branch. Production requires manual approval (configured in GitHub Environment settings). CloudFront invalidation clears CDN cache. Release created for tagged commits.\n\n**If fail:** For AWS credential errors, verify OIDC trust relationship allows `role-to-assume`. For S3 sync failures, check bucket policies and IAM permissions. For environment approval issues, verify protection rules in Settings > Environments.\n\n### Step 6: Add Notification and Monitoring Integration\n\nIntegrate Slack notifications, deployment tracking, and performance monitoring.\n\n```yaml\n  notify:\n    name: Notify Results\n    runs-on: ubuntu-latest\n    needs: [deploy-staging, deploy-production]\n    if: always()  # Run even if previous jobs fail\n    steps:\n      - name: Check job status\n        id: status\n        run: |\n          if [ \"${{ needs.deploy-production.result }}\" == \"success\" ]; then\n            echo \"status=success\" >> $GITHUB_OUTPUT\n            echo \"color=#00FF00\" >> $GITHUB_OUTPUT\n          else\n            echo \"status=failure\" >> $GITHUB_OUTPUT\n            echo \"color=#FF0000\" >> $GITHUB_OUTPUT\n          fi\n\n      - name: Send Slack notification\n        uses: slackapi\u002Fslack-github-action@v1.24.0\n        with:\n          payload: |\n            {\n              \"text\": \"Deployment ${{ steps.status.outputs.status }}\",\n              \"blocks\": [\n                {\n                  \"type\": \"header\",\n                  \"text\": {\n                    \"type\": \"plain_text\",\n                    \"text\": \"🚀 Deployment Status: ${{ steps.status.outputs.status }}\"\n                  }\n                },\n                {\n                  \"type\": \"section\",\n                  \"fields\": [\n                    {\"type\": \"mrkdwn\", \"text\": \"*Repository:*\\n${{ github.repository }}\"},\n                    {\"type\": \"mrkdwn\", \"text\": \"*Branch:*\\n${{ github.ref_name }}\"},\n                    {\"type\": \"mrkdwn\", \"text\": \"*Commit:*\\n${{ github.sha }}\"},\n                    {\"type\": \"mrkdwn\", \"text\": \"*Actor:*\\n${{ github.actor }}\"}\n                  ]\n                },\n                {\n                  \"type\": \"actions\",\n                  \"elements\": [\n                    {\n                      \"type\": \"button\",\n                      \"text\": {\"type\": \"plain_text\", \"text\": \"View Workflow\"},\n                      \"url\": \"${{ github.server_url }}\u002F${{ github.repository }}\u002Factions\u002Fruns\u002F${{ github.run_id }}\"\n                    }\n                  ]\n                }\n              ]\n            }\n        env:\n          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}\n          SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK\n\n      - name: Record deployment in Datadog\n        if: steps.status.outputs.status == 'success'\n        run: |\n          curl -X POST \"https:\u002F\u002Fapi.datadoghq.com\u002Fapi\u002Fv1\u002Fevents\" \\\n            -H \"Content-Type: application\u002Fjson\" \\\n            -H \"DD-API-KEY: ${{ secrets.DD_API_KEY }}\" \\\n            -d @- \u003C\u003CEOF\n          {\n            \"title\": \"Deployment: ${{ github.repository }}\",\n            \"text\": \"Deployed commit ${{ github.sha }} to production\",\n            \"tags\": [\"env:production\", \"service:${{ github.event.repository.name }}\"],\n            \"alert_type\": \"info\"\n          }\n          EOF\n```\n\n**Got:** Slack receives formatted notification with deployment status, repository details, and clickable workflow link. Datadog event logged for successful production deployments with appropriate tags.\n\n**If fail:** For Slack failures, verify webhook URL is valid and workspace allows incoming webhooks. Test with `curl -X POST $SLACK_WEBHOOK_URL -d '{\"text\":\"test\"}'`. For Datadog failures, verify API key has event submission permissions.\n\n## Validation\n\n- [ ] Workflow syntax validates with `yamllint` or GitHub's workflow editor\n- [ ] All jobs have explicit dependencies (`needs:`) to control execution order\n- [ ] Matrix builds cover all target platforms and versions\n- [ ] Caching reduces build time by >50% on subsequent runs\n- [ ] Secrets are stored in GitHub Secrets, never hardcoded in workflow files\n- [ ] Security scans upload results to GitHub Security tab\n- [ ] Environment protection rules require approval for production deployments\n- [ ] Failed deployments don't leave system in inconsistent state\n- [ ] Notifications reach appropriate channels (Slack, email, monitoring tools)\n- [ ] Workflow completes in \u003C10 minutes for typical changes\n\n## Pitfalls\n\n- **Cache key too broad**: Using `${{ runner.os }}-build-` as cache key causes false hits when dependencies change. Include `hashFiles('**\u002Fpackage-lock.json')` in key.\n\n- **Artifact name collisions**: Using static artifact names like `dist` causes overwrites in concurrent builds. Include `${{ github.sha }}` or `${{ matrix.os }}-${{ matrix.node }}` in names.\n\n- **Secrets in logs**: Avoid `echo $SECRET` or similar commands. GitHub masks registered secrets, but derived values may leak. Use `::add-mask::` for dynamic secrets.\n\n- **Insufficient permissions**: Default `GITHUB_TOKEN` has limited permissions. Add explicit `permissions:` block for security events, packages, issues, etc.\n\n- **Missing if conditionals**: Jobs run on all triggers unless guarded with `if: github.ref == 'refs\u002Fheads\u002Fmain'`. Prevent accidental production deploys from PRs.\n\n- **No rollback strategy**: Deployment failures leave system in broken state. Implement blue-green or canary deployments with automatic rollback on health check failures.\n\n- **Hardcoded values**: Workflow contains environment-specific URLs, bucket names, or API endpoints. Use environment variables and GitHub Secrets.\n\n- **No timeout limits**: Jobs hang indefinitely on network issues or infinite loops. Add `timeout-minutes: 15` to all jobs.\n\n## Related Skills\n\n- `setup-github-actions-ci` - Initial GitHub Actions configuration for R packages and basic projects\n- `commit-changes` - Proper Git workflow integration with CI\u002FCD triggers\n- `configure-git-repository` - Repository settings and branch protection rules\n- `setup-container-registry` - Docker image builds in CI\u002FCD pipelines\n- `implement-gitops-workflow` - ArgoCD\u002FFlux integration with CI\u002FCD\n","# Build CI\u002FCD Pipeline\n\nDesign and implement production-grade continuous integration and deployment pipelines with GitHub Actions.\n\n## When to Use\n\n- Setting up automated testing and deployment for a new project\n- Migrating from Jenkins, Travis CI, or CircleCI to GitHub Actions\n- Implementing matrix builds across multiple platforms or language versions\n- Adding build caching to speed up CI\u002FCD execution time\n- Creating multi-stage pipelines with environment-specific deployments\n- Implementing security scanning and code quality gates\n\n## Inputs\n\n- **Required**: Repository with code to test\u002Fbuild\u002Fdeploy\n- **Required**: GitHub Actions workflow directory (`.github\u002Fworkflows\u002F`)\n- **Optional**: Secrets for deployment targets (AWS, Azure, Docker registries)\n- **Optional**: Self-hosted runner configuration for specialized builds\n- **Optional**: Branch protection rules and required status checks\n\n## Procedure\n\n### Step 1: Create Base Workflow Structure\n\nCreate `.github\u002Fworkflows\u002Fci.yml` with trigger configuration and basic job structure.\n\n```yaml\nname: CI Pipeline\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-04-19\"\n\non:\n  push:\n    branches: [main, develop]\n  pull_request:\n    branches: [main, develop]\n  workflow_dispatch:  # Manual trigger\n\nenv:\n  NODE_VERSION: '18'\n  REGISTRY: ghcr.io\n  IMAGE_NAME: ${{ github.repository }}\n\njobs:\n  lint:\n    name: Lint Code\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout code\n        uses: actions\u002Fcheckout@v4\n\n      - name: Setup Node.js\n        uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ env.NODE_VERSION }}\n          cache: 'npm'\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Run ESLint\n        run: npm run lint\n\n      - name: Check formatting\n        run: npm run format:check\n```\n\n**Got:** Workflow file created with proper YAML syntax, triggers configured, and basic lint job defined.\n\n**If fail:** Validate YAML syntax with `yamllint .github\u002Fworkflows\u002Fci.yml`. Check indentation (use spaces, not tabs). Verify action versions are current by checking GitHub Marketplace.\n\n### Step 2: Implement Matrix Build Strategy\n\nAdd matrix builds to test across multiple platforms, language versions, or configurations.\n\n```yaml\n  test:\n    name: Test (${{ matrix.os }}, Node ${{ matrix.node }})\n    runs-on: ${{ matrix.os }}\n    needs: lint\n    strategy:\n      fail-fast: false  # Continue testing other matrix combinations on failure\n      matrix:\n        os: [ubuntu-latest, windows-latest, macos-latest]\n        node: ['16', '18', '20']\n        exclude:\n          - os: macos-latest\n            node: '16'  # Skip old Node on macOS\n\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Setup Node.js ${{ matrix.node }}\n        uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ matrix.node }}\n          cache: 'npm'\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Run tests with coverage\n        run: npm run test:coverage\n\n      - name: Upload coverage to Codecov\n        uses: codecov\u002Fcodecov-action@v3\n        if: matrix.os == 'ubuntu-latest' && matrix.node == '18'\n        with:\n          token: ${{ secrets.CODECOV_TOKEN }}\n          files: .\u002Fcoverage\u002Flcov.info\n          fail_ci_if_error: true\n```\n\n**Got:** Matrix generates 8 parallel jobs (3 OS × 3 Node versions - 1 exclusion). All tests pass across platforms. Coverage report uploads from single canonical job.\n\n**If fail:** If matrix syntax errors occur, verify proper indentation and array notation. For flaky tests, add retry logic with `uses: nick-invision\u002Fretry@v2`. For platform-specific failures, add OS conditionals or expand exclusions.\n\n### Step 3: Configure Dependency Caching and Artifact Management\n\nOptimize build speed with intelligent caching and preserve build artifacts.\n\n```yaml\n  build:\n    name: Build Application\n    runs-on: ubuntu-latest\n    needs: test\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Setup Node.js\n        uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ env.NODE_VERSION }}\n          cache: 'npm'\n\n      - name: Cache build output\n        uses: actions\u002Fcache@v3\n        with:\n          path: |\n            .next\u002Fcache\n            dist\u002F\n            build\u002F\n          key: ${{ runner.os }}-build-${{ hashFiles('**\u002Fpackage-lock.json') }}-${{ hashFiles('**\u002F*.ts', '**\u002F*.tsx') }}\n          restore-keys: |\n            ${{ runner.os }}-build-${{ hashFiles('**\u002Fpackage-lock.json') }}-\n            ${{ runner.os }}-build-\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Build application\n        run: npm run build\n        env:\n          NODE_ENV: production\n\n      - name: Upload build artifacts\n        uses: actions\u002Fupload-artifact@v3\n        with:\n          name: dist-${{ github.sha }}\n          path: |\n            dist\u002F\n            build\u002F\n          retention-days: 7\n          if-no-files-found: error\n```\n\n**Got:** First run downloads dependencies (slow), subsequent runs restore from cache (fast). Build artifacts upload successfully with unique SHA-based naming.\n\n**If fail:** If cache misses frequently, verify cache key includes all relevant file hashes. For upload failures, check path exists and glob patterns match actual build output. Verify `retention-days` meets organizational policies.\n\n### Step 4: Implement Security Scanning and Quality Gates\n\nAdd security vulnerability scanning and code quality enforcement.\n\n```yaml\n  security:\n    name: Security Scan\n    runs-on: ubuntu-latest\n    needs: lint\n    permissions:\n      security-events: write  # Required for uploading SARIF results\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Run Trivy vulnerability scanner\n        uses: aquasecurity\u002Ftrivy-action@master\n        with:\n          scan-type: 'fs'\n          scan-ref: '.'\n          format: 'sarif'\n          output: 'trivy-results.sarif'\n          severity: 'CRITICAL,HIGH'\n\n      - name: Upload Trivy results to GitHub Security\n        uses: github\u002Fcodeql-action\u002Fupload-sarif@v2\n        if: always()  # Upload even if scan finds vulnerabilities\n        with:\n          sarif_file: 'trivy-results.sarif'\n\n      - name: Dependency audit\n        run: npm audit --audit-level=high\n        continue-on-error: true  # Don't fail build, but show warnings\n\n      - name: Check for leaked secrets\n        uses: trufflesecurity\u002Ftrufflehog@main\n        with:\n          path: .\u002F\n          base: ${{ github.event.repository.default_branch }}\n          head: HEAD\n```\n\n**Got:** Security scans complete, results upload to GitHub Security tab. Critical vulnerabilities block merge if branch protection configured. No secrets detected in commits.\n\n**If fail:** For false positives, create `.trivyignore` file with CVE IDs and justifications. For audit failures, review `npm audit fix` suggestions. For secret detection false positives, add patterns to `.trufflehog.yml` exclude list.\n\n### Step 5: Configure Environment-Specific Deployments\n\nSet up deployment stages with environment protection rules and approval gates.\n\n```yaml\n  deploy-staging:\n    name: Deploy to Staging\n    runs-on: ubuntu-latest\n    needs: [build, security]\n    if: github.ref == 'refs\u002Fheads\u002Fdevelop'\n    environment:\n      name: staging\n      url: https:\u002F\u002Fstaging.example.com\n    steps:\n      - name: Download build artifacts\n        uses: actions\u002Fdownload-artifact@v3\n        with:\n          name: dist-${{ github.sha }}\n          path: .\u002Fdist\n\n      - name: Configure AWS credentials\n        uses: aws-actions\u002Fconfigure-aws-credentials@v4\n        with:\n          role-to-assume: ${{ secrets.AWS_ROLE_STAGING }}\n          aws-region: us-east-1\n\n      - name: Deploy to S3\n        run: |\n          aws s3 sync .\u002Fdist s3:\u002F\u002F${{ secrets.S3_BUCKET_STAGING }} --delete\n          aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DIST_STAGING }} --paths \"\u002F*\"\n\n  deploy-production:\n    name: Deploy to Production\n    runs-on: ubuntu-latest\n    needs: [build, security]\n    if: github.ref == 'refs\u002Fheads\u002Fmain'\n    environment:\n      name: production\n      url: https:\u002F\u002Fexample.com\n    steps:\n      - name: Download build artifacts\n        uses: actions\u002Fdownload-artifact@v3\n        with:\n          name: dist-${{ github.sha }}\n          path: .\u002Fdist\n\n      - name: Configure AWS credentials\n        uses: aws-actions\u002Fconfigure-aws-credentials@v4\n        with:\n          role-to-assume: ${{ secrets.AWS_ROLE_PRODUCTION }}\n          aws-region: us-east-1\n\n      - name: Deploy to S3 with blue-green\n        run: |\n          # Deploy to new version\n          aws s3 sync .\u002Fdist s3:\u002F\u002F${{ secrets.S3_BUCKET_PRODUCTION }}\u002Freleases\u002F${{ github.sha }} --delete\n\n          # Update symlink to new version\n          aws s3 cp s3:\u002F\u002F${{ secrets.S3_BUCKET_PRODUCTION }}\u002Freleases\u002F${{ github.sha }} s3:\u002F\u002F${{ secrets.S3_BUCKET_PRODUCTION }}\u002Fcurrent --recursive\n\n          # Invalidate CloudFront\n          aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DIST_PRODUCTION }} --paths \"\u002F*\"\n\n      - name: Create GitHub Release\n        uses: softprops\u002Faction-gh-release@v1\n        if: startsWith(github.ref, 'refs\u002Ftags\u002F')\n        with:\n          files: .\u002Fdist\u002F**\u002F*\n          generate_release_notes: true\n```\n\n**Got:** Staging deploys automatically on develop branch. Production requires manual approval (configured in GitHub Environment settings). CloudFront invalidation clears CDN cache. Release created for tagged commits.\n\n**If fail:** For AWS credential errors, verify OIDC trust relationship allows `role-to-assume`. For S3 sync failures, check bucket policies and IAM permissions. For environment approval issues, verify protection rules in Settings > Environments.\n\n### Step 6: Add Notification and Monitoring Integration\n\nIntegrate Slack notifications, deployment tracking, and performance monitoring.\n\n```yaml\n  notify:\n    name: Notify Results\n    runs-on: ubuntu-latest\n    needs: [deploy-staging, deploy-production]\n    if: always()  # Run even if previous jobs fail\n    steps:\n      - name: Check job status\n        id: status\n        run: |\n          if [ \"${{ needs.deploy-production.result }}\" == \"success\" ]; then\n            echo \"status=success\" >> $GITHUB_OUTPUT\n            echo \"color=#00FF00\" >> $GITHUB_OUTPUT\n          else\n            echo \"status=failure\" >> $GITHUB_OUTPUT\n            echo \"color=#FF0000\" >> $GITHUB_OUTPUT\n          fi\n\n      - name: Send Slack notification\n        uses: slackapi\u002Fslack-github-action@v1.24.0\n        with:\n          payload: |\n            {\n              \"text\": \"Deployment ${{ steps.status.outputs.status }}\",\n              \"blocks\": [\n                {\n                  \"type\": \"header\",\n                  \"text\": {\n                    \"type\": \"plain_text\",\n                    \"text\": \"🚀 Deployment Status: ${{ steps.status.outputs.status }}\"\n                  }\n                },\n                {\n                  \"type\": \"section\",\n                  \"fields\": [\n                    {\"type\": \"mrkdwn\", \"text\": \"*Repository:*\\n${{ github.repository }}\"},\n                    {\"type\": \"mrkdwn\", \"text\": \"*Branch:*\\n${{ github.ref_name }}\"},\n                    {\"type\": \"mrkdwn\", \"text\": \"*Commit:*\\n${{ github.sha }}\"},\n                    {\"type\": \"mrkdwn\", \"text\": \"*Actor:*\\n${{ github.actor }}\"}\n                  ]\n                },\n                {\n                  \"type\": \"actions\",\n                  \"elements\": [\n                    {\n                      \"type\": \"button\",\n                      \"text\": {\"type\": \"plain_text\", \"text\": \"View Workflow\"},\n                      \"url\": \"${{ github.server_url }}\u002F${{ github.repository }}\u002Factions\u002Fruns\u002F${{ github.run_id }}\"\n                    }\n                  ]\n                }\n              ]\n            }\n        env:\n          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}\n          SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK\n\n      - name: Record deployment in Datadog\n        if: steps.status.outputs.status == 'success'\n        run: |\n          curl -X POST \"https:\u002F\u002Fapi.datadoghq.com\u002Fapi\u002Fv1\u002Fevents\" \\\n            -H \"Content-Type: application\u002Fjson\" \\\n            -H \"DD-API-KEY: ${{ secrets.DD_API_KEY }}\" \\\n            -d @- \u003C\u003CEOF\n          {\n            \"title\": \"Deployment: ${{ github.repository }}\",\n            \"text\": \"Deployed commit ${{ github.sha }} to production\",\n            \"tags\": [\"env:production\", \"service:${{ github.event.repository.name }}\"],\n            \"alert_type\": \"info\"\n          }\n          EOF\n```\n\n**Got:** Slack receives formatted notification with deployment status, repository details, and clickable workflow link. Datadog event logged for successful production deployments with appropriate tags.\n\n**If fail:** For Slack failures, verify webhook URL is valid and workspace allows incoming webhooks. Test with `curl -X POST $SLACK_WEBHOOK_URL -d '{\"text\":\"test\"}'`. For Datadog failures, verify API key has event submission permissions.\n\n## Validation\n\n- [ ] Workflow syntax validates with `yamllint` or GitHub's workflow editor\n- [ ] All jobs have explicit dependencies (`needs:`) to control execution order\n- [ ] Matrix builds cover all target platforms and versions\n- [ ] Caching reduces build time by >50% on subsequent runs\n- [ ] Secrets are stored in GitHub Secrets, never hardcoded in workflow files\n- [ ] Security scans upload results to GitHub Security tab\n- [ ] Environment protection rules require approval for production deployments\n- [ ] Failed deployments don't leave system in inconsistent state\n- [ ] Notifications reach appropriate channels (Slack, email, monitoring tools)\n- [ ] Workflow completes in \u003C10 minutes for typical changes\n\n## Pitfalls\n\n- **Cache key too broad**: Using `${{ runner.os }}-build-` as cache key causes false hits when dependencies change. Include `hashFiles('**\u002Fpackage-lock.json')` in key.\n\n- **Artifact name collisions**: Using static artifact names like `dist` causes overwrites in concurrent builds. Include `${{ github.sha }}` or `${{ matrix.os }}-${{ matrix.node }}` in names.\n\n- **Secrets in logs**: Avoid `echo $SECRET` or similar commands. GitHub masks registered secrets, but derived values may leak. Use `::add-mask::` for dynamic secrets.\n\n- **Insufficient permissions**: Default `GITHUB_TOKEN` has limited permissions. Add explicit `permissions:` block for security events, packages, issues, etc.\n\n- **Missing if conditionals**: Jobs run on all triggers unless guarded with `if: github.ref == 'refs\u002Fheads\u002Fmain'`. Prevent accidental production deploys from PRs.\n\n- **No rollback strategy**: Deployment failures leave system in broken state. Implement blue-green or canary deployments with automatic rollback on health check failures.\n\n- **Hardcoded values**: Workflow contains environment-specific URLs, bucket names, or API endpoints. Use environment variables and GitHub Secrets.\n\n- **No timeout limits**: Jobs hang indefinitely on network issues or infinite loops. Add `timeout-minutes: 15` to all jobs.\n\n## Related Skills\n\n- `setup-github-actions-ci` - Initial GitHub Actions configuration for R packages and basic projects\n- `commit-changes` - Proper Git workflow integration with CI\u002FCD triggers\n- `configure-git-repository` - Repository settings and branch protection rules\n- `setup-container-registry` - Docker image builds in CI\u002FCD pipelines\n- `implement-gitops-workflow` - ArgoCD\u002FFlux integration with CI\u002FCD\n",{"name":5,"locale":23,"license":14,"metadata":24,"translator":31,"description":32,"allowed-tools":33,"source_commit":34,"source_locale":35,"translation_date":36},"caveman-lite",{"tags":25,"author":26,"domain":27,"version":28,"language":29,"complexity":30},"ci-cd, github-actions, pipeline, automation, testing","Philipp Thoss","devops","1.0","multi","intermediate","Julius Brussee homage — caveman","Design and implement multi-stage CI\u002FCD pipelines using GitHub Actions with matrix builds, dependency caching, artifact management, and secret handling. Create workflows that span linting, testing, building, and deployment stages with parallel execution and conditional logic. Use when setting up automated testing and deployment for a new project, migrating from Jenkins or CircleCI to GitHub Actions, implementing matrix builds across platforms, adding build caching, or creating multi-stage pipelines with security scanning and quality gates.\n","Read Write Edit Bash Grep Glob","82c77053","en","2026-04-19","master","f483e54f3ad5f202a77d45f2e57f8d970b71195f","skills_library\u002Fbuild-ci-cd-pipeline",2,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills","https:\u002F\u002Fgithub.com\u002Froohe","yoou.link","2026-05-19 15:56:07",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add roohe\u002Fagentic-super-skills --skill build-ci-cd-pipeline",{"tool":51,"command":52},"bunx","bunx skills add roohe\u002Fagentic-super-skills --skill build-ci-cd-pipeline",{"tool":54,"command":55},"pnpm","pnpm dlx skills add roohe\u002Fagentic-super-skills --skill build-ci-cd-pipeline","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fbuild-ci-cd-pipeline\u002FSKILL.md",true,[],[60,67,74,81,88,95],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M73D865CZME2FCMKA4PQM348","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M73D7Z64J4ABWZJD7P44XBBF","youtube-downloader","Download and process YouTube content for research. Use when: downloading competitor videos for analysis; extracting audio for podcasts; getting transcripts for content repurposing; archiving webinars; research content curation","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyoutube-downloader\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M73D7K8778TGZV3GJFR3703D","yc-pitch-deck","Create a compelling startup pitch deck that follows the structure proven to raise billions from top investors. Master the YC and Sequoia formats that get founders funded. Use when: **Fundraising** to create investor pitch decks; **YC application** to structure your narrative; **Demo Day prep** to craft your 2-minute pitch; **Angel investors** to communicate your opportunity; **Partnership pitches** to structure compelling asks","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyc-pitch-deck\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M73D70KJSE0E8Z28YMNNRT04","x-twitter-scraper","Use when the user needs X (Twitter) data or confirmation-gated X actions through Xquik: tweet search, user lookup, follower extraction, media download, monitoring, webhooks, MCP, SDKs, posting, likes, DMs, and profile updates. Requires a Xquik API key. Never ask for X login material.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fx-twitter-scraper\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M73D6ED01GV077R7K4NZNFZJ","write-vignette","Create R package vignettes using R Markdown or Quarto. Covers vignette setup, YAML configuration, code chunk options, building and testing, and CRAN requirements for vignettes. Use when adding a Getting Started tutorial, documenting complex workflows spanning multiple functions, creating domain-specific guides, or when CRAN submission requires user-facing documentation beyond function help pages.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-vignette\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":18},"01M73D69YJR0BK3NFHE0CYG3EF","write-validation-documentation","Write IQ\u002FOQ\u002FPQ validation documentation for computerized systems in regulated environments. Covers protocols, reports, test scripts, deviation handling, and approval workflows. Use when validating R or other software for regulated use, preparing for a regulatory audit, documenting qualification of computing environments, or creating and updating validation protocols and reports for new or re-qualified systems.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-validation-documentation\u002FSKILL.md",[],[]]