This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To be able to deploy the documentation to GitHub Pages, validate the GitHub repo settings: | |
# 1. Go to the repository settings | |
# 2. Go to the Pages section | |
# 3. On "Build and deployment" select the branch "gh-pages" and the folder "/ (root)" | |
name: Build docs site (& deploy if on master to gh-pages) | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Set cache id | |
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
key: mkdocs-material-${{ env.cache_id }} | |
path: .cache | |
restore-keys: | | |
mkdocs-material- | |
- name: Build mkdocs 🗒️ | |
run: | | |
pip install mkdocs mkdocs-material mkdocs-material-extensions mkdocs-macros-plugin mkdocs-redirects mkdocs-drawio-file | |
mkdocs build | |
- name: Deploy to gh-pages 🚀 | |
if: success() | |
run: mkdocs gh-deploy --force |