deploy-preview
Deploy a preview branch to the staging environment for review. Use when a feature branch is ready for visual review, when someone asks to "deploy this for review", or before opening a PR.
- License 许可
- MIT
- 最近更新
- 2026-11-06
- Stars
- ★ 18
- Forks
- 1
01 前言 Front Matter
- name
- deploy-preview
- metadata
- { "forged-by": "codex-agent", "last-used": "2026-02-28", "forged-from": "session-2026-02-10", "usage-count": "11", "forged-reason": "Deployed 3 preview branches manually in one session — same steps each time" }
- description
- Deploy a preview branch to the staging environment for review. Use when a feature branch is ready for visual review, when someone asks to "deploy this for review", or before opening a PR.
02 资源文件 1
- 脚本scripts/deploy-preview.sh1.1 KB
03 SKILL.md 正文
Deploy Preview
Deploy the current branch to a preview URL for review before merging.
Inputs
- Branch name (defaults to current branch)
- Environment (defaults to
staging)
Steps
-
Verify branch is clean
git status --porcelainIf dirty, commit or stash before proceeding.
-
Run tests locally
npm testDo not deploy if tests fail.
-
Push to remote
git push origin HEAD -
Trigger preview deploy
scripts/deploy-preview.shThis builds, uploads, and returns a preview URL.
-
Verify the preview
- Open the preview URL
- Check: page loads, no console errors, key feature works
- If broken: fix locally, re-push, re-deploy
-
Share the preview URL
- Post in the PR description
- Or share in the team channel
Conventions
- Preview URLs follow the pattern:
preview-{branch}.staging.example.com - Preview deploys expire after 7 days
- Only one preview per branch (re-deploying replaces the previous)
Edge Cases
- Branch name has slashes: The deploy script sanitizes
/to- - Large assets: Preview deploys skip video files >50MB
- Environment variables: Preview uses staging env vars, not production
04 同仓库更多 Skills
skillforge
Create or update a reusable agent skill. Use when you notice a repeated pattern, when a workflow should be persisted for future sessions, or when asked to forge/create/scaffold a new skill.
skillforge
Create or update a reusable agent skill. Use when you notice a repeated pattern, when a workflow should be persisted for future sessions, or when asked to forge/create/scaffold a new skill.
component-scaffold
Create a new React component with co-located test, story, and styles. Use when creating new UI components, when asked to scaffold/generate a component, or when building new pages.
bug-triage
Triage a bug report into an actionable GitHub issue with severity, reproduction steps, and assignment. Use when a bug is reported, when error logs need investigation, or when asked to file/triage an issue.
api-endpoint
Scaffold a REST API endpoint with route, controller, validation, and tests. Use when creating new API endpoints, adding resources, or when asked to build a new backend route.
finish-the-loop
Close implementation loops with target-bound independent evidence and a portable proof receipt. Use when an agent changes a real system and must earn a completion claim that survives the session.