1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
---
name: Pages Deploy
on:
workflow_dispatch:
release:
types: [published]
env:
MAIN_PY_VER: "3.13"
jobs:
deploy-pages:
runs-on: ubuntu-latest
environment: github-pages
name: Build documentation site and deploy to GH-Pages
steps:
- name: Checkout sources
uses: actions/checkout@v5
with:
ref: ${{ github.ref }}
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ env.MAIN_PY_VER }}
- name: Cache pip repository
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ env.MAIN_PY_VER }}
- name: Prepare python environment
run: |
pip install -r requirements.txt
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: Cache poetry virtual environment
uses: actions/cache@v4
with:
path: .venv
key: ${{ runner.os }}-poetry-${{ hashFiles('**/pyproject.toml') }}-${{ env.MAIN_PY_VER }}
- name: Build documentation site
run: |
poetry lock
poetry install --no-interaction
poetry run poe docs_build
- name: Deploy to GH-Pages
uses: peaceiris/actions-gh-pages@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
cname: aioswitcher.figenblat.com
commit_message: 'docs: deployed documentation site '
|