Sitemd deploy
Deploy the site to its configured hosting target. Builds and publishes in one step.
git clone https://github.com/sitemd-cc/sitemd
T=$(mktemp -d) && git clone --depth=1 https://github.com/sitemd-cc/sitemd "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/skills/deploy" ~/.claude/skills/sitemd-cc-sitemd-deploy-d5f465 && rm -rf "$T"
.claude/skills/deploy/SKILL.mdDeploy Site
Build the site and publish it to the configured hosting target in one step.
Procedure
1. Check project state
Call
sitemd_status to get auth state and deploy configuration.
2. Ensure authentication
If not authenticated:
- Call
— it returns a URL and codesitemd_auth_login - Tell the user to open the URL and enter the code
- Call
to complete the loginsitemd_auth_poll - Confirm login succeeded before continuing
3. Ensure site is activated
If the site is not activated (check
sitemd_status):
- Ensure the
field is set inurl
— if not, ask the user for their domain and set itsettings/meta.md - Call
to activate the site (permanent, consumes 1 site slot)sitemd_activate - The
command also triggers activation automatically if neededdeploy
4. Ensure deploy credentials are configured
If deploy credentials are missing, call
sitemd_status to check what's set, then guide the user through providing the required values based on their target.
Read
settings/deploy.md to determine the target (default: cloudflare). Required keys by target:
Cloudflare (default):
— Pages project namedeploy.cloudflareProject
— Account IDdeploy.cloudflareAccountId
— API tokendeploy.cloudflareApiToken
— Production branch (optional, defaults todeploy.cloudflareBranch
— must match the project's production branch in Cloudflare dashboard)main
Netlify:
— Site IDdeploy.netlifySiteId
— Personal access tokendeploy.netlifyToken
Vercel:
— Project IDdeploy.vercelProjectId
— API tokendeploy.vercelToken
— Team ID (optional)deploy.vercelTeamId
GitHub Pages:
— Repository (owner/repo)deploy.githubRepo
— Personal access tokendeploy.githubToken
— Deploy branch (optional, defaults todeploy.githubBranch
)gh-pages
For each missing key, ask the user for the value and call
sitemd_config_set with key and value.
5. Confirm branch (first deploy only)
On the first deploy for a target, confirm the deploy branch with the user:
- Cloudflare: "Deploying to branch
(Cloudflare Pages production default). Is this correct?" — if not, setmain
viadeploy.cloudflareBranchsitemd_config_set - GitHub Pages: "Deploying to branch
. Is this correct?" — if not, setgh-pages
viadeploy.githubBranchsitemd_config_set
Skip this step on subsequent deploys if the branch is already configured.
6. SEO health check
Call
sitemd_seo_audit with scope all.
Always present the full report to the user following the
/seo skill report format:
- Show the score with assessment (Excellent / Good / Needs attention / Critical)
- List all errors with the
explanation and fix suggestionwhy - List all warnings with the
explanation and fix suggestionwhy - List info items as "Opportunities"
- Show summary: X passed, Y errors, Z warnings
Then ask: "Want me to fix any of these before deploying, or skip and continue?"
- If the user wants to fix issues: follow the
skill fix procedure, then re-run the audit and present again/seo - If the user says skip/continue: proceed to deploy
7. Deploy
Call
sitemd_deploy (no arguments — it reads config from settings and the config store).
Report the result: domain and number of pages deployed. If it fails, show the error and suggest checking credentials via
sitemd_status.
Rules
- No permission required — Call MCP tools immediately
- Never store credentials in settings files — Always use
for API keys and tokenssitemd_config_set - Don't skip pre-flight checks — Always verify auth and config before deploying, even if the user says "just deploy"
- If the user wants to change their deploy target, update
frontmatter and then set the new target's credentials viasettings/deploy.mdsitemd_config_set