Deploy from CI with commit metadata
cloudflare pages
// what it does
Attaches git context to the deployment so the dashboard shows which commit shipped, and drives prod-vs-preview off the CI branch variable. This is the standard shape for a GitHub Actions or GitLab step doing direct upload.
// shell
$ wrangler pages deploy ./dist --project-name my-app --branch "$GITHUB_REF_NAME" --commit-hash "$GITHUB_SHA" --commit-message "$(git log -1 --pretty=%s)" --commit-dirty=true// gotcha
In CI the working tree is often dirty, which makes wrangler print a dirty-working-tree warning — pass `--commit-dirty=true` to suppress it and keep the metadata clean.