-
-
Notifications
You must be signed in to change notification settings - Fork 45
40 lines (35 loc) · 976 Bytes
/
gen-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
name: Gen Docs
on:
workflow_dispatch:
push:
branches:
- master
paths:
- 'docs/hugo/**'
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: false
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Install theme.
run: |
git clone --depth=1 https://github.com/alex-shpak/hugo-book docs/hugo/themes/hugo-book
- name: Install Hugo.
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
# Needed to build SCSS/SASS with transpiler set to 'libsass'
extended: true
- name: Generate.
run: |
cd docs/hugo
hugo --minify
- name: Deploy.
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/hugo/public