Skip to content

Update mkdocs.yml

Update mkdocs.yml #12

Workflow file for this run

# Name of this GitHub Actions workflow (shows up in the Actions tab)
name: Deploy MkDocs site to GitHub Pages
# Trigger the workflow when pushing to the "main" branch
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
# Allow the workflow to write to the repository (needed to publish to gh-pages)
permissions:
contents: write
# Define the jobs that will run in this workflow
jobs:
deploy: # Name of the job
runs-on: ubuntu-latest
steps:
# Step 1: Check out the code from the repository
- name: Checkout repository
uses: actions/checkout@v4
# Step 2: Set up Python (version 3.12) in the runner
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
# Step 3: Install Python dependencies from requirements.txt located in the root directory
- name: Install dependencies from requirements.txt
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# Step 4: Build the MkDocs site (outputs HTML to ./site)
- name: Build MkDocs site
run: mkdocs build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # Auth token for pushing
publish_dir: ./site # Directory to deploy (default MkDocs output)