-
Notifications
You must be signed in to change notification settings - Fork 203
47 lines (39 loc) · 1.32 KB
/
deploy-cloudflare-workers.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
36
37
38
39
40
41
42
43
44
45
46
47
# https://github.com/marketplace/actions/deploy-to-cloudflare-workers-with-wrangler
# https://github.com/cloudflare/wrangler-action
name: Deploy to Cloudflare Workers with Wrangler
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
run_install: false
- name: Write Wrangler configs
run: |
echo ${{ secrets.WRANGLER_ENV }} | base64 -d > doesitarm-default/.env
cat doesitarm-default/.env
echo ${{ secrets.WRANGLER_TOML }} | base64 -d > doesitarm-default/wrangler.toml
cat doesitarm-default/wrangler.toml
pnpm install
# Analytics Worker
echo ${{ secrets.ANALYTICS_WRANGER_TOML }} | base64 -d > workers/analytics/wrangler.toml
cat workers/analytics/wrangler.toml
pnpm install
- name: Deploy Default Worker
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
workingDirectory: 'doesitarm-default'
- name: Deploy Analytics Worker
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
workingDirectory: 'workers/analytics'