Skip to content

Commit c8f80ec

Browse files
committed
Deploy to gh-pages when push to main
1 parent f608dd5 commit c8f80ec

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

.github/workflows/gh-pages.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
gh-pages:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- run: git config --global user.name "Andrey Kuzmin"
14+
- run: git config --global user.email "[email protected]"
15+
16+
- uses: actions/setup-node@v1
17+
with:
18+
node-version: "12"
19+
20+
- uses: actions/cache@v2
21+
with:
22+
path: |
23+
~/.npm
24+
~/.elm
25+
elm-stuff
26+
key: ${{ runner.os }}-cache
27+
28+
- run: npm install -g [email protected] [email protected]
29+
30+
- run: elm-test
31+
32+
- uses: actions/checkout@v2
33+
with:
34+
path: gh-pages
35+
ref: gh-pages
36+
- run: ./scripts/gh-pages.sh

scripts/gh-pages.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ set -euxo pipefail
33

44
version=${1:-}
55

6-
if [ ! -z "$version" ]; then
6+
if [ -z "$version" ]; then
7+
version_path=""
8+
else
79
version_path="/$version"
810
fi
911

0 commit comments

Comments
 (0)