2022-04-29 18:57:00 +00:00
|
|
|
name: Documentation
|
2020-12-09 19:52:21 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
2022-04-29 18:57:00 +00:00
|
|
|
doc:
|
|
|
|
name: Build and deploy documentation
|
2020-12-09 19:52:21 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
2023-08-19 16:05:33 +00:00
|
|
|
GO_VERSION: stable
|
2024-08-14 21:55:11 +00:00
|
|
|
HUGO_VERSION: 0.131.0
|
2020-12-09 19:52:21 +00:00
|
|
|
CGO_ENABLED: 0
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
# https://github.com/marketplace/actions/checkout
|
|
|
|
- name: Check out code
|
2024-02-02 01:21:10 +00:00
|
|
|
uses: actions/checkout@v4
|
2020-12-09 19:52:21 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
2024-02-02 01:21:10 +00:00
|
|
|
# https://github.com/marketplace/actions/setup-go-environment
|
|
|
|
- name: Set up Go ${{ env.GO_VERSION }}
|
|
|
|
uses: actions/setup-go@v5
|
|
|
|
with:
|
|
|
|
go-version: ${{ env.GO_VERSION }}
|
|
|
|
|
2022-05-20 20:42:26 +00:00
|
|
|
- name: Generate DNS docs
|
|
|
|
run: make generate-dns
|
2020-12-09 19:52:21 +00:00
|
|
|
|
|
|
|
- name: Install Hugo
|
|
|
|
run: |
|
2023-08-18 23:20:15 +00:00
|
|
|
wget -O /tmp/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-amd64.deb
|
2020-12-09 19:52:21 +00:00
|
|
|
sudo dpkg -i /tmp/hugo.deb
|
|
|
|
|
|
|
|
- name: Build Documentation
|
|
|
|
run: make docs-build
|
|
|
|
|
|
|
|
# https://github.com/marketplace/actions/github-pages
|
|
|
|
- name: Deploy to GitHub Pages
|
2024-02-02 01:21:10 +00:00
|
|
|
uses: crazy-max/ghaction-github-pages@v4
|
2020-12-09 19:52:21 +00:00
|
|
|
with:
|
|
|
|
target_branch: gh-pages
|
|
|
|
build_dir: docs/public
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|