Skip to content

docs

docs #71

Workflow file for this run

name: docs
on:
workflow_dispatch:
inputs:
version:
description: 'Version (e.g. "v0.5")'
type: string
required: true
latest:
description: 'latest'
type: boolean
dev:
description: 'dev'
type: boolean
env:
GIT_USER: "github-actions"
GIT_EMAIL: "[email protected]"
jobs:
docs:
name: update docs ${{ inputs.version }}
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: setup go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
cache: true
- name: install mkdocs and mike
run: pip install mkdocs-material mike
- name: set 'latest' alias
if: inputs.latest
run: echo 'alias=latest' >> $GITHUB_ENV
- name: set 'dev' alias
if: inputs.dev
run: echo 'alias=dev' >> $GITHUB_ENV
- name: fetch gh-pages branch
run: |
git config --global user.email "$GIT_EMAIL"
git config --global user.name "$GIT_USER"
git fetch origin gh-pages --depth=1
- name: mike deploy
run: |
cp -f charts/zora/README.md docs/helm-chart.md
cp -f charts/zora/values.yaml docs/values.yaml
mike deploy --update-aliases ${{ inputs.version }} ${{ env.alias }}
- name: update titles and push
run: |
git checkout gh-pages
go run update_titles.go
git add versions.json
git diff-index --quiet HEAD || git commit -m "update titles"
git push origin gh-pages