-
Notifications
You must be signed in to change notification settings - Fork 317
36 lines (34 loc) · 946 Bytes
/
main.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
name: Deploy
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Navigate to repo
run: cd $GITHUB_WORKSPACE
- uses: actions/setup-node@v1
with:
node-version: '19.x'
- name: Install deps
run: npm ci
- name: Build site
run: npm run build
- name: Build Workers script
run: npm run build-worker
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
- name: Wrangler auth check
run: npm run wrangler-whoami
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
- name: Upload assets
run: npm run deploy-worker
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}