-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (42 loc) · 1.03 KB
/
ci.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 GitHub Pages Dist"
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Use Node.js 15.x
uses: actions/setup-node@v1
with:
node-version: 15.x
- name: Checkout Sources
uses: actions/checkout@v2
with:
ref: master
path: source
- name: Checkout GitHub Pages
uses: actions/checkout@v2
with:
ref: gh-pages
path: pages
- name: Cleanup Pages
run: |
cd pages
git fetch --tags
git reset --hard GHPAGES-ROOT
cd ..
- name: Build dist
run: |
cd source
yarn install
yarn build --mode production --dest ../pages --modern --no-clean --no-unsafe-inline
cd ..
- name: Upload built pages
run: |
cd pages
git config --local user.name 'github-actions'
git config --local user.email '[email protected]'
git add --all
git commit -m "ci: update"
git push -f