Skip to content

Merge pull request #171 from ncfavier/patch-1 #154

Merge pull request #171 from ncfavier/patch-1

Merge pull request #171 from ncfavier/patch-1 #154

Workflow file for this run

name: MKDocs
on:
push:
branches: [develop,mkdocs-*]
tags: [v*]
paths:
- .github/workflows/mkdocs.yml
- docs/**
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 # FIXME: should use the version from the same Git commit
rename-to: rzk
chmod: 0755
- name: Check Rzk files for each language
run:
for lang_dir in $(ls -d docs/docs/*/); do
pushd ${lang_dir} && rzk typecheck; popd ;
done
- name: Check Rzk formatting for each language
run:
for lang_dir in $(ls -d docs/docs/*/); do
pushd ${lang_dir} && rzk format --check; popd ;
done
- 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 != 'develop' && !startsWith(github.ref_name, 'mkdocs') }}
run: |
for config in $(ls docs/config/*/mkdocs.yml); do
mike deploy --push --update-aliases --config-file ${config} ${{ github.ref_name }} latest;
mike set-default latest --config-file ${config} --push;
done
- name: 🚀 Deploy with mike (${{ github.ref_name }})
if: ${{ github.ref_name == 'develop' || startsWith(github.ref_name, 'mkdocs') }}
run: |
for config in $(ls docs/config/*/mkdocs.yml); do
mike deploy --push --config-file ${config} ${{ github.ref_name }};
done