diff --git a/.gitea/workflows/pages-deploy.yml b/.gitea/workflows/pages-deploy.yml index efa6bca..da20d3e 100644 --- a/.gitea/workflows/pages-deploy.yml +++ b/.gitea/workflows/pages-deploy.yml @@ -34,7 +34,7 @@ jobs: CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} run: | curl -sS -X POST \ - "https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/pages/projects/linearvoid-frontend/deployments" \ + "https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/pages/projects/linearvoid/deployments" \ -H "Authorization: Bearer ${CLOUDFLARE_API_TOKEN}" \ -H "Content-Type: application/octet-stream" \ --data-binary @site.tgz diff --git a/docs/infrastructure/cloudflare/cloudflare-account-troubleshooting.md b/docs/infrastructure/cloudflare/cloudflare-account-troubleshooting.md new file mode 100644 index 0000000..dc0fe0b --- /dev/null +++ b/docs/infrastructure/cloudflare/cloudflare-account-troubleshooting.md @@ -0,0 +1,25 @@ +# Cloudflare Account Troubleshooting + +Reference for Cloudflare account and API token troubleshooting. + +Use `https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/pages/projects` to verify the account ID and API token are valid. + +## Validate Cloudflare account and API token + +```powershell +# Validate Cloudflare account and API token in .env +Set-Location -Path "E:\Documents\02-Projects\07-Mentoring\Corey\linearvoid" +Get-Content .env | Select-String 'CLOUDFLARE_API_TOKEN' +Get-Content .env | Select-String 'CLOUDFLARE_ACCOUNT_ID' + +# Test API token with curl +$env:CLOUDFLARE_API_TOKEN = (Get-Content .env | Select-String 'CLOUDFLARE_API_TOKEN' | ForEach-Object { $_.Line.Split('=')[1].Trim() }) +$env:CLOUDFLARE_ACCOUNT_ID = (Get-Content .env | Select-String 'CLOUDFLARE_ACCOUNT_ID' | ForEach-Object { $_.Line.Split('=')[1].Trim() }) + +# List all Pages projects for the account +curl -X GET "https://api.cloudflare.com/client/v4/accounts/$env:CLOUDFLARE_ACCOUNT_ID/pages/projects" -H "Authorization: Bearer $env:CLOUDFLARE_API_TOKEN" -H "Content-Type: application/json" + +# Create a new Pages project (if needed) +curl -X POST "https://api.cloudflare.com/client/v4/accounts/$env:CLOUDFLARE_ACCOUNT_ID/pages/projects" -H "Authorization: Bearer $env:CLOUDFLARE_API_TOKEN" -H "Content-Type: application/json" -d '{"name":"linearvoid","production_branch":"main"}' + +``` diff --git a/scripts/loadtest/README.md b/scripts/loadtest/README.md index d38598b..844346f 100644 --- a/scripts/loadtest/README.md +++ b/scripts/loadtest/README.md @@ -1,6 +1,6 @@ # Load Test Scaffolding -These files back the scaling/performance playbook. +These files back the [scaling/performance playbook](../../docs/operations/scaling-performance-playbook.md). ## WebSocket chat