diff --git a/src/content/blog/gitea-cloudflare-deployment/index.mdx b/src/content/blog/gitea-cloudflare-deployment/index.mdx index dfea31e..319835f 100644 --- a/src/content/blog/gitea-cloudflare-deployment/index.mdx +++ b/src/content/blog/gitea-cloudflare-deployment/index.mdx @@ -24,6 +24,7 @@ Before getting started, you'll need: - A Gitea instance with Actions enabled ([documentation](https://docs.gitea.com/usage/actions/overview)) - A registered Gitea runner (ubuntu-latest or equivalent) - A Cloudflare account with access to Pages +- An existing Cloudflare Pages project - Your project set up with pnpm (adjust commands for npm/yarn as needed) --- @@ -74,6 +75,10 @@ jobs: command: pages deploy ./dist --project-name="your-project-name" ``` +> [!WARNING] +> If your Cloudflare Pages project doesn't exist yet, create it before running the workflow, otherwise it will fail. + + The workflow triggers on pushes to `main`, installs dependencies, builds the site, and deploys using Cloudflare's Wrangler action. Every push to main goes straight to production. > [!NOTE] @@ -83,9 +88,6 @@ The workflow triggers on pushes to `main`, installs dependencies, builds the sit ## Required Secrets -> [!TIP] -> If your Cloudflare Pages project doesn't exist yet, Wrangler will create it automatically on the first deployment. - You'll need to configure two secrets in your Gitea repository (Settings → Actions → Secrets): - `CLOUDFLARE_API_TOKEN` — Create this in the Cloudflare dashboard: Profile → API Tokens → Create Token → Use the "Edit Cloudflare Pages" template (or create a custom token with **Account: Cloudflare Pages: Edit** permission)