-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (35 loc) · 1 KB
/
deploy.yml
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
name: Deploy to Cloudflare Pages
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'dist/**'
- '.github/workflows/deploy.yml'
- "wrangler.toml"
- "worker.template.js"
- "Makefile"
jobs:
deploy:
name: Deploy to Cloudflare Pages
runs-on: ubuntu-latest
concurrency: build-web
steps:
- uses: actions/checkout@v3
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.IMMERSIVE_CLOUDFLARE_API_TOKEN }}
accountId: ${{secrets.IMMERSIVE_CLOUDFLARE_ACCOUNT_ID}}
projectName: config
directory: dist
- name: build worker
run: make build
- name: Deploy worker
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.IMMERSIVE_CLOUDFLARE_API_TOKEN }}
accountId: ${{secrets.IMMERSIVE_CLOUDFLARE_ACCOUNT_ID}}
workingDirectory: ./
command: deploy ./.cache/worker.js --env prod