Note de couche #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Documentation publisher | |
env: | |
PROJECT_FOLDER: "menu_from_project" | |
PYTHON_VERSION: 3.8 | |
on: | |
push: | |
branches: [ master ] | |
paths: | |
- 'docs/**/*' | |
- '.github/workflows/doc2pages.yml' | |
jobs: | |
doc-publisher: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '${{ env.PYTHON_VERSION }}' | |
- uses: actions/[email protected] | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/documentation.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install project requirements | |
run: | | |
python -m pip install -U pip setuptools wheel | |
python -m pip install -U -r requirements/documentation.txt | |
- name: Build doc using Sphinx | |
run: sphinx-build -b html docs docs/_build/html | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.PROJECT_FOLDER }}-doc-latest | |
path: docs/_build/html | |
if-no-files-found: error | |
- name: Deploy to GitHub Pages | |
run: ghp-import --force --no-jekyll --push docs/_build/html |