mirror of
https://gitea.com/gitea/docs.git
synced 2026-09-17 19:55:34 +00:00
Pull requests now get a Cloudflare Pages preview deployment after the site build succeeds, and the preview URL is written back as the last line of the pull request description. - `concurrency` cancels the previous preview build when a pull request is pushed again. - After `make build`, the workflow copies `cloudflare/_headers` into `build/` (same as the production deployment, so the file is never published to S3/CloudFront) and runs `wrangler pages deploy build --project-name docs-gitea-com --branch pr-<number>`, then extracts the `*.pages.dev` URL from the wrangler output. Notes: - Pull requests from forks do not receive the secrets, in that case the preview steps are skipped with a log message and the build check still runs. - Requires `CLOUDFLARE_ACCOUNT_ID` / `CLOUDFLARE_API_TOKEN` (Pages edit permission) and `DEPLOY_TOKEN` (pull request write permission). <!-- cloudflare-preview --> Preview: https://pr-498.docs-gitea-com.pages.dev Reviewed-on: https://gitea.com/gitea/docs/pulls/498 Reviewed-by: Zettat123 <[email protected]>