Skip to content

Documentation

Documentation #21

Workflow file for this run

name: Documentation
on:
workflow_dispatch:
push:
branches:
- main
jobs:
docs:
name: Update documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch tags
run: git fetch --prune --unshallow
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11.6
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material mike
- uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'adopt'
- name: Get current Readium version
run: echo "READIUM_VERSION=`git describe --tag --match [0-9]* --abbrev=0`" >> $GITHUB_ENV
- name: Run Dokka
run: ./gradlew dokkaGfmMultiModule
- name: Copy README.md into docs to replace Dokka index.md
run: cp README.md index.md
- name: Run MkDocs
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
mike deploy ${{ env.READIUM_VERSION }}
mike set-default ${{ env.READIUM_VERSION }}
mike deploy --push --update-aliases ${{ env.READIUM_VERSION }} latest