-
-
Notifications
You must be signed in to change notification settings - Fork 48
52 lines (44 loc) · 1.18 KB
/
gh-pages.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
name: github pages
on:
push:
branches:
- docs
jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v3
with:
ref: docs
submodules: true
- name: Get contributors
run: |
git fetch origin master
git checkout origin/master -- .all-contributorsrc
cp .all-contributorsrc docs/data/contributors.json
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
- name: Generate CLI docs
env:
LINKS_PREFIX: "/hostctl"
run: |
go run ./cmd/hostctl/main.go gen-md-docs --path docs/content/docs/cli-usage
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.68.3'
extended: true
- name: Build site
run: |
cd docs
hugo --minify --enableGitInfo
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/public
force_orphan: true
enable_jekyll: true
publish_branch: gh-pages