-
-
Notifications
You must be signed in to change notification settings - Fork 6
46 lines (39 loc) · 1.09 KB
/
build-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
name: Build web
on:
workflow_dispatch:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v2
with:
node-version: 16
- uses: actions/cache@v2
id: cache
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm i --force
- name: Build app
run: |
node env_writer.js
npx ng build --configuration=production --base-href=/simple-obs-stt/
cp ./src/404.html ./dist/
env:
TW_CLIENT: ${{ secrets.TW_CLIENT }}
SERVER_HOST: ${{ secrets.SERVER_HOST }}
BUILD_ENV: production
- name: Deploy Github pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist