-
Notifications
You must be signed in to change notification settings - Fork 4
39 lines (31 loc) · 865 Bytes
/
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
name: deploy web
on:
push:
branches:
- main
jobs:
deploy-web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup node env
uses: actions/[email protected]
with:
node-version: 18
- name: Cache node_modules
id: cache
uses: actions/cache@v2
with:
path: node_modules
key: ubuntu-latest-node-v18-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Build
run: npm run build
env:
NITRO_PRESET: cloudflare
- name: Publish to Cloudflare
run: npx wrangler deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}