Skip to content

Commit

Permalink
Test docs build.
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-innocenti committed Nov 25, 2024
1 parent 645bd9c commit 826c313
Showing 1 changed file with 28 additions and 18 deletions.
46 changes: 28 additions & 18 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,39 @@
name: Build docs

on:
push:
branches:
- master
- main
-
permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
build:
strategy:
matrix:
python-version: [ 3.11 ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .
python -m pip install -r docs/requirements.txt
- name: Build docs
run: |
mkdocs build
mkdocs build # twice, see https://github.com/patrick-kidger/pytkdocs_tweaks
- name: Deploy docs
- run: mkdocs gh-deploy --force

0 comments on commit 826c313

Please sign in to comment.