lego/.github/workflows/documentation.yml

51 lines
1.2 KiB
YAML
Raw Normal View History

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-02-09 16:19:58 +00:00
GO_VERSION: '1.20'
2022-06-16 22:25:42 +00:00
HUGO_VERSION: 0.101.0
2020-12-09 19:52:21 +00:00
CGO_ENABLED: 0
steps:
# https://github.com/marketplace/actions/setup-go-environment
- name: Set up Go ${{ env.GO_VERSION }}
2022-12-10 10:17:05 +00:00
uses: actions/setup-go@v3
2020-12-09 19:52:21 +00:00
with:
go-version: ${{ env.GO_VERSION }}
# https://github.com/marketplace/actions/checkout
- name: Check out code
2022-12-10 10:17:05 +00:00
uses: actions/checkout@v3
2020-12-09 19:52:21 +00:00
with:
fetch-depth: 0
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: |
wget -O /tmp/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.deb
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
2022-12-10 10:17:05 +00:00
uses: crazy-max/ghaction-github-pages@v3
2020-12-09 19:52:21 +00:00
with:
target_branch: gh-pages
build_dir: docs/public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}