-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 928 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
name: Deployment Workflow
on:
push:
branches:
- "main"
jobs:
deploy:
name: Deploying
# needs: [test, lint]
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-npm-
${{ runner.OS }}-
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: npm ci
- name: Publish
run: npx wrangler publish
env:
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}