Add files via upload #21
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: Build MkDocs | |
on: | |
push: | |
branches: [main] | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check-out repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup python | |
id: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Load cached Poetry installation | |
id: cached-poetry | |
uses: actions/cache@v3 | |
with: | |
path: ~/.local | |
key: poetry-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }} | |
- name: Install Poetry | |
if: steps.cached-poetry.outputs.cache-hit != 'true' | |
uses: snok/install-poetry@v1 | |
- name: Configure Poetry | |
run: poetry config virtualenvs.in-project true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root --only docs | |
- name: Install project | |
run: poetry install --no-interaction --only docs | |
- name: Deploy MkDocs | |
run: | | |
source .venv/bin/activate | |
mkdocs gh-deploy --force --clean --verbose |