Skip to content

Commit 3b14281

Browse files
committed
docs: added auto-deployment for documentation website
1 parent d827604 commit 3b14281

File tree

1 file changed

+56
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)