-
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.23 KB
/
docs.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
45
46
47
48
49
50
51
52
53
54
55
name: Docs
on:
push:
branches:
- master
- docs
paths:
- '**.yml'
- '**.toml'
- '**.md'
- content/**
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
publish-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.91.2'
extended: true
- name: Check out GitHub page repo
uses: actions/checkout@v3
with:
path: 'gh-pages'
ref: 'gh-pages'
- name: Build doc artifacts with Hugo
run: hugo --cleanDestinationDir --destination gh-pages --minify
# TODO: Generate better commit message
- name: Publish doc artifacts
continue-on-error: true
run: |
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -F- <<-_UBLT_COMMIT_MSG_
auto: ${{ github.event.head_commit.message }}
SourceCommit: https://github.com/jcs090218/blog/commit/${{ github.sha }}
_UBLT_COMMIT_MSG_
git push
working-directory: gh-pages