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 Jun 12, 2024
1 parent 8924006 commit 71e14c2
Showing 1 changed file with 30 additions and 19 deletions.
49 changes: 30 additions & 19 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
name: Build docs

on:
push:
branches:
- 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
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
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: Upload docs
uses: actions/upload-artifact@v2
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
name: docs
path: site # where `mkdocs build` puts the built site

0 comments on commit 71e14c2

Please sign in to comment.