Some checks failed
Deploy MkDocs / deploy (push) Has been cancelled
Switch GitHub Actions workflows (`docs`, `mirror`, `pypi`) from `ubuntu-latest` to `self-hosted` runners. This change also updates the Python environment setup in `docs.yml` and `pypi.yml` to manually create and activate a virtual environment (`venv`). This provides more control over the Python environment on self-hosted machines and ensures dependencies are isolated.
54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
name: Deploy MkDocs
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'docs/**'
|
|
- 'mkdocs.yml'
|
|
- '.github/workflows/docs.yml'
|
|
branches:
|
|
- master
|
|
workflow_dispatch:
|
|
inputs:
|
|
environment:
|
|
description: 'Target environment'
|
|
required: true
|
|
default: 'production'
|
|
debug:
|
|
description: 'Enable debug mode'
|
|
required: false
|
|
default: 'false'
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: self-hosted
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout source
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
run: |
|
|
python -m venv venv
|
|
source venv/bin/activate
|
|
pip install --upgrade pip
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
source venv/bin/activate
|
|
pip install mkdocs mkdocs-material
|
|
|
|
- name: Configure Git author from GitHub Actions metadata
|
|
run: |
|
|
git config --global user.name "${{ github.actor }}"
|
|
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
|
|
|
|
- name: Deploy docs
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
source venv/bin/activate
|
|
mkdocs gh-deploy --force --clean
|