-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (31 loc) · 1019 Bytes
/
Copy pathdeploy-cloudflare-pages.yml
File metadata and controls
37 lines (31 loc) · 1019 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Deploy to Cloudflare Pages
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: cloudflare-pages-production
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
steps:
- name: Check deployment credentials
if: ${{ env.CLOUDFLARE_API_TOKEN == '' }}
run: echo "Cloudflare deployment skipped because CLOUDFLARE_API_TOKEN is not configured."
- name: Check out repository
if: ${{ env.CLOUDFLARE_API_TOKEN != '' }}
uses: actions/checkout@v4
- name: Deploy production site
if: ${{ env.CLOUDFLARE_API_TOKEN != '' }}
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: 764113b33c73a4d7ee914c828d7c1fa6
wranglerVersion: "4.105.0"
command: pages deploy . --project-name=us-address-generator --branch=main