-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1000 Bytes
/
deploy-web.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
name: Build and Deploy
on:
push:
branches:
- main
env:
NODE: 18
WORKING_DIRECTORY: packages/web
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ env.NODE }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE }}
cache: "yarn"
cache-dependency-path: ${{ env.WORKING_DIRECTORY }}/yarn.lock
- name: Install Dependencies
run: yarn install
working-directory: ${{ env.WORKING_DIRECTORY }}
- name: Lint
run: yarn lint
working-directory: ${{ env.WORKING_DIRECTORY }}
- name: Deploy to surge
run: yarn deploy
working-directory: ${{ env.WORKING_DIRECTORY }}
env:
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}