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-08-19 16:05:33 +00:00
GO_VERSION: stable
HUGO_VERSION: '0.117.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: |
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 }}