Publish to GitHub pages #37
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 to GitHub pages | |
permissions: | |
contents: write | |
on: | |
workflow_run: | |
workflows: ["Fix Notes"] | |
types: | |
- completed | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set git user | |
run: git config --global user.name 'Workflow' | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Cache Python | |
uses: actions/cache@v2 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ env.pythonLocation }}-${{ hashFiles('.github/mkdocs/requirements.txt') }} | |
- name: Prepare MkDocs build | |
run: bash .github/scripts/prepare_publish.sh | |
- name: Publish MkDocs | |
run: mkdocs gh-deploy -m "[MkDocs] Publishing commit {sha}" |