ci: add auto publish of mkdocs #1
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 Publish | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main # Change this to your main branch name | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
- name: Install dependencies | |
run: | | |
poetry install --no-root | |
- name: Build and deploy | |
run: | | |
poetry run mkdocs build --verbose | |
poetry run mkdocs gh-deploy --verbose --force | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |