Skip to content

Commit 7e9ef57

Browse files
skeptomaiclaude
andcommitted
docs: Update deployment workflow with automated staging and visible watermarks
- Add automated staging deployment to "Engage!" workflow - Update deploy-frontend.sh to show watermarks in both staging and production - Staging watermark: Shows commit hash + timestamp - Production watermark: Shows release version from git tag - Add production deployment safety requirement (user must run manually) - Document complete 10-step release workflow including deployment phases 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent d185ca5 commit 7e9ef57

File tree

2 files changed

+34
-15
lines changed

2 files changed

+34
-15
lines changed

CLAUDE.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,35 @@ When the user says "Engage!", you should automatically:
7676
4. **Push the tag to trigger CI:**
7777
- `git push origin vX.Y.Z`
7878
- GitHub Actions will automatically build all binary assets and create a DRAFT release
79-
5. **Wait for CI completion:**
79+
5. **Deploy to staging:**
80+
- Run `./infrastructure/scripts/deploy-frontend.sh staging`
81+
- This auto-deploys with visible watermark showing commit hash + timestamp
82+
- Verify staging deployment at https://staging.gruesome.skeptomai.com
83+
- Check that watermark displays correctly in browser (bottom-right corner)
84+
6. **Wait for CI completion:**
8085
- Monitor CI builds to ensure all assets are created
8186
- Verify draft release has all binary assets
82-
6. **Publish the release:**
87+
7. **Publish the release:**
8388
- Use `gh release edit vX.Y.Z --title "vX.Y.Z: <title>" --notes "<release notes>" --draft=false`
8489
- Include comprehensive changelog of significant changes
8590
- This moves the release from DRAFT to published (Latest)
86-
7. **Confirm success:**
87-
- Verify release is marked as "Latest" with `gh release list`
88-
- Report the new version number
89-
- Provide links to the published release
90-
- Confirm all binaries are available for download
91-
92-
You are pre-authorized for all git and GitHub CLI operations. Execute the entire workflow without asking for permission.
91+
8. **Ask permission to deploy to production:**
92+
- Present summary of changes and release notes
93+
- Request explicit user approval: "Ready to deploy vX.Y.Z to production?"
94+
- Wait for user confirmation before proceeding
95+
9. **Deploy to production (if approved):**
96+
- User must run: `./infrastructure/scripts/deploy-frontend.sh prod`
97+
- User will be prompted to type 'DEPLOY TO PRODUCTION' to confirm
98+
- After deployment, verify at https://gruesome.skeptomai.com
99+
- Check that watermark shows release version (e.g., "v2.16.2")
100+
10. **Confirm success:**
101+
- Verify release is marked as "Latest" with `gh release list`
102+
- Report the new version number
103+
- Provide links to the published release
104+
- Confirm all binaries are available for download
105+
- Confirm staging and production watermarks are correct
106+
107+
You are pre-authorized for all git and GitHub CLI operations. For production deployment, you MUST ask the user to run the deployment command manually due to the interactive safety prompt.
93108

94109
## Re-Release Instructions ("Reengage!")
95110

infrastructure/scripts/deploy-frontend.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,18 @@ BUILD_VERSION="${COMMIT_HASH} @ ${BUILD_TIME}"
5757
echo "Build version: $BUILD_VERSION"
5858
echo ""
5959

60-
# Inject build version into HTML (only for staging)
60+
# Inject build version into HTML
6161
if [ "$ENV" == "staging" ]; then
62-
# Create temporary HTML with build version injected
63-
sed "s/<span id=\"build-version\">DEV<\/span>/<span id=\"build-version\">$BUILD_VERSION<\/span>/" index.html > index.tmp.html
64-
mv index.tmp.html index.deploy.html
62+
# Staging: Show commit hash + timestamp (visible watermark)
63+
sed -e "s/<span id=\"build-version\">DEV<\/span>/<span id=\"build-version\">$BUILD_VERSION<\/span>/" \
64+
-e 's/style="position: fixed; bottom: 0; right: 0; background: rgba(0,0,0,0.7); color: #666; padding: 5px 10px; font-size: 10px; font-family: monospace; z-index: 9999; display: none;"/style="position: fixed; bottom: 0; right: 0; background: rgba(0,0,0,0.7); color: #666; padding: 5px 10px; font-size: 10px; font-family: monospace; z-index: 9999; display: block;"/' \
65+
index.html > index.deploy.html
6566
else
66-
# Use original HTML for production (no watermark)
67-
cp index.html index.deploy.html
67+
# Production: Show release version from git tag (visible watermark)
68+
RELEASE_VERSION=$(git -C .. describe --tags --abbrev=0 2>/dev/null || echo "unknown")
69+
sed -e "s/<span id=\"build-version\">DEV<\/span>/<span id=\"build-version\">$RELEASE_VERSION<\/span>/" \
70+
-e 's/style="position: fixed; bottom: 0; right: 0; background: rgba(0,0,0,0.7); color: #666; padding: 5px 10px; font-size: 10px; font-family: monospace; z-index: 9999; display: none;"/style="position: fixed; bottom: 0; right: 0; background: rgba(0,0,0,0.7); color: #666; padding: 5px 10px; font-size: 10px; font-family: monospace; z-index: 9999; display: block;"/' \
71+
index.html > index.deploy.html
6872
fi
6973

7074
# Upload files to S3

0 commit comments

Comments
 (0)