-
Notifications
You must be signed in to change notification settings - Fork 36
50 lines (40 loc) · 1.39 KB
/
cd.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
name: Test, build, deploy
on:
push:
branches:
- main
jobs:
cd:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [14]
steps:
- name: Checkout 🛎
uses: actions/checkout@master
- name: Setup node env 🏗
uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
- name: Install dependencies 👨🏻💻
run: npm ci
- name: Run linter 👀
run: npm run lint
- name: Run tests 🧪
run: npm run test
- name: Build 👷🏽
run: npm run generate
env:
ROUTER_BASE: /pycontw-frontend/ # repo name
BUILD_TARGET: static
API_URL_BROWSER: https://staging.pycon.tw/prs
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
GOOGLE_TAG_MANAGER_ID: ${{ secrets.GOOGLE_TAG_MANAGER_ID }}
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: dist
CLEAN: true