|
|
@ -1,12 +1,27 @@
|
|
|
|
name: Deploy docs to GitHub Pages via mkdocs
|
|
|
|
name: Build mkdocs and deploy to GitHub Pages
|
|
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
on: [push, pull_request]
|
|
|
|
push:
|
|
|
|
|
|
|
|
branches:
|
|
|
|
|
|
|
|
- master
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
build:
|
|
|
|
|
|
|
|
name: Build docs
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- uses: actions/setup-python@v4
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
python-version: 3.x
|
|
|
|
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
key: ${{ github.ref }}
|
|
|
|
|
|
|
|
path: .cache
|
|
|
|
|
|
|
|
- run: pip install -r docs/requirements.txt
|
|
|
|
|
|
|
|
- run: mkdocs build
|
|
|
|
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
deploy:
|
|
|
|
|
|
|
|
if: github.event_name == 'push' && contains(fromJson('["refs/heads/master", "refs/heads/main"]'), github.ref)
|
|
|
|
|
|
|
|
needs: build
|
|
|
|
name: Deploy docs
|
|
|
|
name: Deploy docs
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
@ -16,5 +31,9 @@ jobs:
|
|
|
|
- uses: actions/setup-python@v4
|
|
|
|
- uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
python-version: 3.x
|
|
|
|
python-version: 3.x
|
|
|
|
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
key: ${{ github.ref }}
|
|
|
|
|
|
|
|
path: .cache
|
|
|
|
- run: pip install -r docs/requirements.txt
|
|
|
|
- run: pip install -r docs/requirements.txt
|
|
|
|
- run: mkdocs gh-deploy --force
|
|
|
|
- run: mkdocs gh-deploy --force
|
|
|
|