-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (82 loc) · 2.94 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: 🌎 Deploy Web
on:
# Allows this workflow to be triggered from another workflow
workflow_call:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
environment: github-pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Cache node modules
uses: actions/cache@v3
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm ci
- name: Typecheck TypeScript
run: lerna run --scope=*/web typecheck
- name: Create .env
uses: SpicyPizza/create-envfile@v1
with:
envkey_API_URL: ${{ secrets.API_URL }}
envkey_GMAPS_KEY: ${{ secrets.GMAPS_KEY }}
envkey_GTAG_ID: ${{ secrets.GTAG_ID }}
envkey_LINK_GITHUB: ${{ secrets.LINK_GITHUB }}
envkey_LINK_GITHUB_CLIENT: ${{ secrets.LINK_GITHUB_CLIENT }}
envkey_LINK_GITHUB_SERVER: ${{ secrets.LINK_GITHUB_SERVER }}
envkey_PWA_BASE_URL: ${{ secrets.PWA_BASE_URL }}
envkey_WS_URL: ${{ secrets.WS_URL }}
- name: 🛠️ Build
run: lerna run --scope=*/web build
- name: 🚀 Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./packages/web/dist
percy:
environment: github-pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Cache node modules
uses: actions/cache@v3
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm ci
- name: Typecheck TypeScript
run: lerna run --scope=*/web typecheck
- name: Create .env
uses: SpicyPizza/create-envfile@v1
with:
envkey_API_URL: ${{ secrets.API_URL }}
envkey_GMAPS_KEY: ${{ secrets.PERCY_GMAPS_KEY }}
envkey_GTAG_ID: ${{ secrets.GTAG_ID }}
envkey_LINK_GITHUB: ${{ secrets.LINK_GITHUB }}
envkey_LINK_GITHUB_CLIENT: ${{ secrets.LINK_GITHUB_CLIENT }}
envkey_LINK_GITHUB_SERVER: ${{ secrets.LINK_GITHUB_SERVER }}
envkey_PWA_BASE_URL: ${{ secrets.PWA_BASE_URL }}
envkey_WS_URL: ${{ secrets.WS_URL }}
- name: 🦔 Percy
run: lerna run --scope=*/web percy
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}