$npx -y skills add pavel-molyanov/molyanov-ai-dev --skill deploy-pipelineSets up CI/CD pipelines, deployment configuration, and automated deploy workflows. GitHub Actions, platform-specific deploy (Vercel, Railway, Fly.io, AWS, VPS), secrets management in CI. Use when: "подготовь деплой", "настрой автодеплой", "настрой CI/CD", "setup deploy", "configu
| 1 | <!-- Generated by sync-to-codex v1. Do not edit directly. --> |
| 2 | |
| 3 | # Deploy Pipeline |
| 4 | |
| 5 | ## Project Documentation Autosync |
| 6 | |
| 7 | Project documentation source of truth is Claude-side: `CLAUDE.md` and `.claude/**`. |
| 8 | Codex-side `AGENTS.md` and `.codex/**` are generated runtime files. |
| 9 | |
| 10 | After changing any project-local `.claude/**` file, immediately run: |
| 11 | |
| 12 | ```bash |
| 13 | ~/.claude/scripts/sync-to-codex.sh --project "$PWD" --apply |
| 14 | ``` |
| 15 | |
| 16 | If sync reports a conflict, stop and report it. Include generated `.codex/**` changes in the same commit as the `.claude/**` source change. |
| 17 | |
| 18 | ## Gathering Deployment Context |
| 19 | |
| 20 | Read project-knowledge to understand the deployment target: |
| 21 | - `.claude/skills/project-knowledge/references/deployment.md` |
| 22 | - `.claude/skills/project-knowledge/references/architecture.md` |
| 23 | - `.claude/skills/project-knowledge/references/patterns.md` |
| 24 | |
| 25 | If deployment target is not documented, ask the user: |
| 26 | - Target platform (Vercel, Railway, Fly.io, AWS ECS, VPS, NPM, Chrome Web Store) |
| 27 | - Environment details (URLs, project/service IDs, server access) |
| 28 | - Required secrets and where to obtain them |
| 29 | |
| 30 | After gathering answers, immediately update `deployment.md` before proceeding with setup. |
| 31 | |
| 32 | ## CI/CD Convention |
| 33 | |
| 34 | Create `.github/workflows/ci.yml` following this structure: |
| 35 | |
| 36 | ```yaml |
| 37 | name: CI |
| 38 | on: |
| 39 | push: |
| 40 | branches: [main] |
| 41 | pull_request: |
| 42 | branches: [main] |
| 43 | |
| 44 | jobs: |
| 45 | check-skip: |
| 46 | runs-on: ubuntu-latest |
| 47 | outputs: |
| 48 | should_skip: ${{ steps.check.outputs.should_skip }} |
| 49 | steps: |
| 50 | - uses: actions/checkout@v4 |
| 51 | with: |
| 52 | fetch-depth: 2 |
| 53 | - id: check |
| 54 | run: | |
| 55 | FILES=$(git diff --name-only HEAD~1 HEAD 2>/dev/null || git diff --name-only HEAD) |
| 56 | if echo "$FILES" | grep -vqE '\.(md|txt)$|^\.claude/|^\.spec/|^docs/'; then |
| 57 | echo "should_skip=false" >> $GITHUB_OUTPUT |
| 58 | else |
| 59 | echo "should_skip=true" >> $GITHUB_OUTPUT |
| 60 | fi |
| 61 | |
| 62 | test: |
| 63 | needs: check-skip |
| 64 | if: needs.check-skip.outputs.should_skip != 'true' |
| 65 | runs-on: ubuntu-latest |
| 66 | steps: |
| 67 | - uses: actions/checkout@v4 |
| 68 | # setup, install, lint, type-check, test, build |
| 69 | |
| 70 | deploy: |
| 71 | needs: test |
| 72 | if: github.ref == 'refs/heads/main' && github.event_name == 'push' |
| 73 | runs-on: ubuntu-latest |
| 74 | steps: |
| 75 | - uses: actions/checkout@v4 |
| 76 | # platform-specific deploy action |
| 77 | ``` |
| 78 | |
| 79 | Adapt: add language setup, install steps, platform-specific deploy action. |
| 80 | |
| 81 | ## Platform Selection |
| 82 | |
| 83 | | Platform | Choose when | |
| 84 | |----------|------------| |
| 85 | | Vercel | Next.js, React, static sites, serverless | |
| 86 | | Railway | Full-stack apps needing managed DB | |
| 87 | | Fly.io | Docker containers, global edge | |
| 88 | | AWS ECS | Enterprise, full infrastructure control | |
| 89 | | Custom VPS | Persistent sessions, multi-device | |
| 90 | | NPM | Node.js packages or CLI tools | |
| 91 | | Chrome Web Store | Browser extensions | |
| 92 | |
| 93 | For VPS deployments: server-specific details (IPs, SSH keys, paths) go to `deployment.md`. |
| 94 | |
| 95 | ## Secrets Convention |
| 96 | |
| 97 | Document all required secrets in `.claude/skills/project-knowledge/references/deployment.md`. For each secret: |
| 98 | - Name (GitHub Actions key) |
| 99 | - Where to obtain value (dashboard URL or CLI command) |
| 100 | - Which workflow uses it |
| 101 | |
| 102 | Guide user to add secrets in GitHub repository settings. Create `.env.example` with application-level variable names. |
| 103 | |
| 104 | ## Documentation Updates |
| 105 | |
| 106 | After configuring, update project-knowledge references. Append to existing content. |
| 107 | |
| 108 | **deployment.md:** deploy target, pipeline overview, required secrets table, manual deploy command, rollback steps. |
| 109 | |
| 110 | **patterns.md (Git Workflow section):** CI triggers, pipeline jobs, skip logic pattern, PR workflow. |
| 111 | |
| 112 | ## Decision Framework |
| 113 | |
| 114 | **Add deploy job?** |
| 115 | YES if: deployment target defined, user requests it, stable main branch. |
| 116 | NO if: early development, manual deploys preferred, manual review step needed (Chrome Web Store). |
| 117 | |
| 118 | **Use matrix strategy?** |
| 119 | YES if: NPM package, cross-platform library. |
| 120 | NO if: single-environment app, internal tool. |
| 121 | |
| 122 | **Add staging?** |
| 123 | YES if: project uses main + dev branches (default workflow). |
| 124 | NO if: Vercel preview deploys sufficient. |