Skip to content

Build docs

Build docs #3

Workflow file for this run

name: Deploy docs
on:
release:
types: [published]
jobs:
deploy_docs:
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: git fetch gh-pages
run: git fetch origin gh-pages --depth=1
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-w90-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-w90-
- run: pip install -r docs/requirements.txt
# This deploys mkdocs-built html, now we use mike to deploy
# html to have doc versioning.
#
# - run: mkdocs build -s
# working-directory: ./docs
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# ENABLE_MKDOCS_GIT_COMMITTERS: True
# - name: Deploy to GitHub Pages
# uses: peaceiris/actions-gh-pages@v3
# if: github.ref == 'refs/heads/develop'
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./docs/site
- name: mike deploy
run: mike deploy --push --update-aliases ${{ github.ref_name }} latest
working-directory: ./docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ENABLE_MKDOCS_GIT_COMMITTERS: True