Prompt file imported from WiredMind2/fable-tetrazero (
.cursor/commands/deploy.md). Fill in{{arguments}}before use. Copyright stays with the author.
Deploy — commit, push, and publish
Ship the current project to tetrazero.com via GitHub and SSH.
Arguments: {{arguments}} — optional commit message. If omitted and there are uncommitted changes, the deploy script uses a timestamped default (deploy: update site (YYYY-MM-DD HH:mm)).
Invoking /deploy without dry-run is explicit approval to commit (when needed), push, and deploy.
Workflow
- Review
git statusandgit diffbriefly — warn if secret files (.env, credentials) would be committed; never deploy them. - Run the deploy script from the repo root:
npm run deploy -- {{arguments}}
If {{arguments}} is empty, run npm run deploy with no extra args.
- Report the commit message (if any), push result, remote build output, and verification line from curl.
What the script does
| Step | Action |
|---|---|
| Commit | git add -A + git commit only when the working tree is dirty |
| Push | git push origin master |
| Remote | ssh tetrazero → git pull, npm ci, npm run build in /var/www/fable-tetrazero |
| Verify | HTTP check on localhost with Host: tetrazero.com |
Apache already serves /var/www/fable-tetrazero/dist — no reload needed after build.
Flags
dry-runorplan— show what would happen (status, planned commit message, remote commands) but do not commit, push, or SSH.
Failure handling
- If commit hooks fail: fix the issue, then re-run
/deploy— do not--amendunless the user asks. - If push fails: stop and report; do not attempt remote deploy.
- If SSH or remote build fails: report the error; the site keeps serving the previous build.
Git safety
- Never update git config
- Never skip hooks (
--no-verify) - Never force-push
- Never commit secret/credential files
