Skip to content

fix: pipelines test

fix: pipelines test #9

Workflow file for this run

name: Deploy MkDocs to GitHub Pages
on:
push:
branches:
- main # Deploy when changes are pushed to the main branch
paths:
- 'docs/**' # Deploy when changes are made to the docs directory
- 'mkdocs.yml' # Deploy when changes are made to the MkDocs configuration file
- 'pyproject.toml' # Deploy when changes are made to the Poetry configuration file
- '.python-version' # Deploy when changes are made to the Python version file
- '.github/workflows/deploy-mkdocs.yml' # Deploy when changes are made to the workflow file
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get Python version from .python-version
id: python_version
run: echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install
- name: Build MkDocs site
run: poetry run mkdocs build
- name: Archive built site
uses: actions/upload-artifact@v4
with:
name: mkdocs-site
path: site
deploy:
needs: build # Ensure the 'build' job completes successfully before deploying
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download built site
uses: actions/download-artifact@v4
with:
name: mkdocs-site
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GH_TOKEN }}
publish_dir: .