Publish mkdocs documentation #7
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: Publish mkdocs documentation | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- 'docs/**' | |
permissions: | |
contents: write | |
jobs: | |
build-and-publish: | |
name: Publish mkdocs documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- run: pip install --upgrade pip && pip install mkdocs mkdocs-gen-files mkdocs-cinder mkdocs-include-dir-to-nav | |
- run: pip install mkdocs-material | |
- name: Build MkDocs site | |
run: mkdocs build | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./site |