MKDocs #135
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
name: MKDocs | |
on: | |
push: | |
branches: [master] | |
tags: [v*] | |
paths: | |
- .github/workflows/mkdocs.yml | |
- mkdocs.yml | |
- custom_theme/** | |
- requirements.txt | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
mkdocs: | |
name: 'Build and Deploy MkDocs to GitHub Pages' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📥 Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: 🧰 Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
cache: 'pip' # caching pip dependencies | |
- name: 🔨 Install rzk proof assistant | |
uses: jaxxstorm/action-install-gh-release@v1.10.0 | |
with: | |
repo: rzk-lang/rzk | |
tag: latest | |
rename-to: rzk | |
chmod: 0755 | |
- name: 🔨 Install MkDocs Material and mike | |
run: pip install -r docs/requirements.txt | |
- name: ⚙️ Configure Git user | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
- name: 🚀 Deploy with mike (${{ github.ref_name }}, latest) | |
if: ${{ github.ref_name != 'master' }} | |
run: | | |
mike deploy --rebase --push --update-aliases --config-file docs/mkdocs.yml ${{ github.ref_name }} latest | |
- name: 🚀 Deploy with mike (${{ github.ref_name }}) | |
if: ${{ github.ref_name == 'master' }} | |
run: | | |
mike deploy --rebase --push --config-file docs/mkdocs.yml ${{ github.ref_name }} |