fix(mkdocs): pass Cloudflare credentials as action inputs instead of env vars

The cloudflare/wrangler-action@v3 expects apiToken and accountId to be
passed
as action input parameters, not environment variables. This was causing
the
deployment to fail with 'CLOUDFLARE_API_TOKEN environment variable'
error.
This commit is contained in:
perf3ct 2025-08-16 15:41:52 +00:00
parent ab962bfd04
commit 3a797b159f
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232
1 changed files with 4 additions and 6 deletions

View File

@ -89,22 +89,20 @@ jobs:
- name: Deploy to Cloudflare Pages
id: deploy
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy site --project-name=readur-docs --branch=${{ github.ref_name }}
# Deploy preview for PRs
- name: Deploy Preview to Cloudflare Pages
id: preview-deployment
if: github.event_name == 'pull_request'
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy site --project-name=readur-docs --branch=pr-${{ github.event.pull_request.number }}
# Post deployment URL as PR comment