-
Notifications
You must be signed in to change notification settings - Fork 200
54 lines (43 loc) · 1.34 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Deploy to Cloudflare
on:
push:
branches: [ "main" ]
jobs:
worker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: '18'
# For some reason, the default registry MAY FAIL WITH ECONNRESET on GitHub Actions
- name: Setup Registry
run: |
cd worker
npm install --registry https://registry.npm.taobao.org
npm install [email protected] --registry https://registry.npm.taobao.org
- name: Deploy Workers
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.API_TOKEN }}
command: deploy
workingDirectory: worker
page:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: '18'
# For some reason, the default registry MAY FAIL WITH ECONNRESET on GitHub Actions
- name: Setup Registry
run: |
npm install --registry https://registry.npm.taobao.org
npm install [email protected] --registry https://registry.npm.taobao.org
- name: Deploy Pages
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.API_TOKEN }}
preCommands: |
npx @cloudflare/next-on-pages
command: pages deploy .vercel/output/static