-
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.18 KB
/
nodejs.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: Node CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm ci
- name: Build
run: |
npm run production
# GitHub Pages SPA
cp deploy/404.html out/404.html
cp deploy/gh-pages-spa.js out/gh-pages-spa.js
sed '7i\'$'\n''<script src="/gh-pages-spa.js"></script>'$'\n' out/design-system/index.html > out/design-system/index-modified.html
mv out/design-system/index{-modified,}.html
env:
CI: true
- name: Deploy
if: success() && github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./out
github_token: ${{ secrets.GITHUB_TOKEN }}
cname: uiengine-sample-react.uix.space
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'