Skip to content

feat: Generate docs from templates #164

feat: Generate docs from templates

feat: Generate docs from templates #164

Workflow file for this run

---
name: Docs
on:
push:
branches: [ main ]
paths:
- '**.md'
pull_request:
branches: [ main ]
paths:
- '**.md'
jobs:
markdown-link-check:
name: Broken Links
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Run link check
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'no'
use-verbose-mode: 'yes'
check-modified-files-only: 'yes'
config-file: '.github/mlc_config.json'
base-branch: main
autogenerated-doc-check:
name: Verify Auto-Generated Docs
strategy:
matrix:
os: [ubuntu-latest]
go-version: [1.19.x]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgpgme-dev libbtrfs-dev libdevmapper-dev
- name: Ensure go modules are tidy
run: |
cd docs && make docs
if [[ -n $(git status -s) ]] ; then
echo
echo -e "\e[31mAuto-generated docs have been modified incorrectly."
echo -e "\e[31mAuto-generated docs changes should be made in ./docs/src"
echo -e "\e[31mPlease update your PR to address these issues.\e[0m"
git status -s
git diff --color
exit 1
fi