Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

archival notice

archival notice #451

Workflow file for this run

name: Create godocs
on:
push:
branches:
- master
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: code
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
path: gh-pages
ref: gh-pages
- name: Set up Go 1.20
uses: actions/setup-go@v4
with:
go-version: "1.20"
id: go
- name: Get godoc
run: go install golang.org/x/tools/cmd/godoc@latest
- name: Generate docs
run: |
cd "${GITHUB_WORKSPACE}/code"
.github/docs/generate_docs.sh
- name: Commit updated pages
run: |
cd "${GITHUB_WORKSPACE}/gh-pages"
git config user.name github-actions
git config user.email [email protected]
if output=$(git status --untracked-files=no --porcelain) && [ -z "$output" ]; then
echo "Working directory clean. No changes detected, documentation up to date."
else
echo "Changes detected"
git add .
git commit -m "Generated documentation"
git push origin gh-pages
fi