Skip to content

Commit 0c10c22

Browse files
committed
Sun Sep 5 22:52:58 CST 2021
1 parent 6f55ebb commit 0c10c22

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/documentation.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: documentation
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
checks:
11+
if: github.event_name != 'push'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v1
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: '12.x'
18+
- name: Test Build
19+
run: |
20+
if [ -e yarn.lock ]; then
21+
yarn install --frozen-lockfile
22+
elif [ -e package-lock.json ]; then
23+
npm ci
24+
else
25+
npm i
26+
fi
27+
npm run build
28+
gh-release:
29+
if: github.event_name != 'pull_request'
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v1
33+
- uses: actions/setup-node@v1
34+
with:
35+
node-version: '12.x'
36+
- uses: webfactory/[email protected]
37+
with:
38+
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }}
39+
- name: Release to GitHub Pages
40+
env:
41+
USE_SSH: true
42+
GIT_USER: xulis
43+
run: |
44+
git config --global user.email "[email protected]"
45+
git config --global user.name "xulis"
46+
if [ -e yarn.lock ]; then
47+
yarn install --frozen-lockfile
48+
elif [ -e package-lock.json ]; then
49+
npm ci
50+
else
51+
npm i
52+
fi
53+
npm run deploy

0 commit comments

Comments
 (0)