Skip to content

Commit 6ba5ff0

Browse files
committed
Adds github action to build/publish
1 parent 0327008 commit 6ba5ff0

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/website.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: website
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- # https://github.com/actions/checkout
16+
name: Checkout
17+
uses: actions/checkout@v1
18+
- # https://github.com/crazy-max/ghaction-hugo
19+
name: Hugo
20+
uses: crazy-max/ghaction-hugo@v1
21+
with:
22+
version: latest
23+
args: --cleanDestinationDir --minify --verbose
24+
- # https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-deploy_key
25+
name: Deploy
26+
if: success() && github.event_name != 'pull_request'
27+
uses: peaceiris/actions-gh-pages@v3
28+
with:
29+
github_token: ${{ secrets.GITHUB_TOKEN }}
30+
publish_dir: ./public
31+
disable_nojekyll: true

0 commit comments

Comments
 (0)