Skip to content

Update static.yml

Update static.yml #16

Workflow file for this run

name: Deploy MkDocs to GitHub Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4
# Step 2: Set up Python environment
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
# Step 3: Install package and set PYTHONPATH
- name: Install package and documentation dependencies
run: |
export PYTHONPATH=$PYTHONPATH:$(pwd)/src
# pip install -e .
# Step 4: Install MkDocs and required plugins
- name: Install MkDocs and plugins
run: |
pip install mkdocs mkdocs-material mkdocs-autorefs mkdocstrings[python] mkdocs-jupyter pymdown-extensions termynal mkdocs-minify-plugin
# Step 5: Debug environment to check installed packages
- name: Debug environment
run: |
python -m pip freeze
python -m mkdocs --version
# Step 6: Build the MkDocs site with verbose output
- name: Build MkDocs site
run: poetry run mkdocs gh-deploy --force
# Step 7: Upload the generated site directory as an artifact for GitHub Pages
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './site'
# Step 8: Deploy to GitHub Pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4