Fix docs-site deploy: npx wrangler instead of wrangler-action
- commit
- 73b04bbd3e42fcec5e6c20b31b797c7c3fd165cb
- parent
- cdb83ea0404ef6a3bb1102ad22507689000da517
- parent
- 8b4f3612987f14337abd9ba9d9025de5fc009fb0
- author
- FelineStateMachine <dami.etoile@gmail.com>
| M | .github/ | 22 | +++++++++------------- |
@@ -39,18 +39,14 @@ jobs:
3939 run: npm ci --prefix website4040 - name: Build site (fails on broken links)4141 run: npm run build --prefix website42- - name: Ensure Pages project exists43- if: github.event_name == 'push'44- continue-on-error: true # fails when the project already exists; that is fine45- uses: cloudflare/wrangler-action@v346- with:47- apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}48- accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}49- command: pages project create lofi-host --production-branch=main42+ # wrangler runs via npx (npm cache) rather than wrangler-action: the action43+ # installs wrangler with `npm i` into the checkout, and npm cannot graft44+ # onto the Deno-managed node_modules layout at the repo root.5045 - name: Deploy to Cloudflare Pages5146 if: github.event_name == 'push'52- uses: cloudflare/wrangler-action@v353- with:54- apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}55- accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}56- command: pages deploy website/build --project-name=lofi-host47+ env:48+ CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}49+ CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}50+ run: |51+ npx --yes wrangler@4 pages project create lofi-host --production-branch=main || true52+ npx --yes wrangler@4 pages deploy website/build --project-name=lofi-host