Skip to content

chore: update CI workflow for Python setup and Poetry path management… #25

chore: update CI workflow for Python setup and Poetry path management…

chore: update CI workflow for Python setup and Poetry path management… #25

Workflow file for this run

name: Documentation Deployment
on:
push:
branches:
- main
paths:
- "docs/**"
- "mkdocs.yml"
- ".github/workflows/documentation.yml"
jobs:
deploy:
name: Build and Deploy Documentation
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
- name: Install Poetry
uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a # v1
with:
version: latest
virtualenvs-create: true
installer-parallel: true
- name: Add Poetry to PATH
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Load cached Poetry dependencies
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install documentation dependencies
run: |
poetry install --with docs --no-root --no-interaction
- name: Build documentation
run: |
poetry run mkdocs build --strict
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@e9c66a37f080288a11235e32cbe2dc5fb3a679cc # v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
cname: northpowered.github.io
keep_files: false