content: fix error in CF Pages CI/CD post
Generate a build and push to Cloudflare Pages / Build and Deploy to Cloudflare Pages (push) Failing after 46s
Generate a build and push to Cloudflare Pages / Build and Deploy to Cloudflare Pages (push) Failing after 46s
Update the post to mention that the Cloudflare Pages project should exist before running the workflow - the wrangler action does not create it as previously stated.
This commit is contained in:
+5
-3
@@ -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 Gitea instance with Actions enabled ([documentation](https://docs.gitea.com/usage/actions/overview))
|
||||||
- A registered Gitea runner (ubuntu-latest or equivalent)
|
- A registered Gitea runner (ubuntu-latest or equivalent)
|
||||||
- A Cloudflare account with access to Pages
|
- 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)
|
- 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"
|
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.
|
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]
|
> [!NOTE]
|
||||||
@@ -83,9 +88,6 @@ The workflow triggers on pushes to `main`, installs dependencies, builds the sit
|
|||||||
|
|
||||||
## Required Secrets
|
## 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):
|
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)
|
- `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)
|
||||||
|
|||||||
Reference in New Issue
Block a user