Skip to content

Commit 4bb81e5

Browse files
committed
Update GitHub Actions workflow to include permissions and use Cloudflare Wrangler for deployment
1 parent ebe23f9 commit 4bb81e5

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/build-deploy.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
jobs:
1414
build-deploy:
1515
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
deployments: write
1619
steps:
1720
- name: Checkout Repository
1821
uses: actions/checkout@v3
@@ -48,7 +51,8 @@ jobs:
4851
run: pnpm build
4952

5053
- name: Deploy to Cloudflare Pages
51-
env:
52-
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
53-
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
54-
run: pnpm deploy
54+
uses: cloudflare/wrangler-action@2.0.0
55+
with:
56+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
57+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
58+
command: pages deploy public --project-name=bytelog

0 commit comments

Comments
 (0)