This repository was archived by the owner on May 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
59 lines (48 loc) · 1.7 KB
/
github-pages.yml
File metadata and controls
59 lines (48 loc) · 1.7 KB
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
56
57
58
59
# Build docs and publish to github pages
name: github pages
on:
workflow_dispatch: # Allow manual triggering of the action
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2
with:
ref: 'main'
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2 # see https://github.com/peaceiris/actions-hugo for details
with:
hugo-version: '0.85.0'
extended: true
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Setup Go environment
uses: actions/setup-go@v2.1.4
with:
go-version: 1.19.3
- name: Clean Docs
run: make clean-docs
- name: Generate Docs
run: >
(cd packages/cli && go mod vendor) &&
(cd site && mkdir -p themes && cd themes && git clone --recurse-submodules --depth 1 https://github.com/google/docsy.git) &&
make docs
- name: Deploy To Pages
uses: peaceiris/actions-gh-pages@v3 # see https://github.com/peaceiris/actions-gh-pages for details
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages # set to 'gh-pages to publish to github pages'
publish_dir: ./docs # Deploy the contents of ./docs to github pages