fix docs action #9
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 docs via GitHub Pages | |
on: # yamllint disable-line rule:truthy | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/publish-docs.yaml" | |
- "mkdocs.yaml" | |
- "docs/**" | |
jobs: | |
publish-docs: | |
runs-on: ubuntu-22.04 | |
if: github.event.pull_request.head.repo.fork == false | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- run: | | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
- run: | | |
pip install \ | |
mkdocs>=1.1 \ | |
mkdocs-macros-plugin >=0.5 \ | |
mkdocs-material >=1.0 \ | |
mkdocs-minify-plugin>=0.3 \ | |
mkdocs-redirects>=1.0 | |
- run: mkdocs gh-deploy --config-file ./mkdocs.yml --force |