Don't run check-manifest in ci - it doesn't recognise files added by … #26
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: docs | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Install python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
with: | |
key: mkdocs-material-${{ env.cache_id }} | |
path: .cache | |
restore-keys: | | |
mkdocs-material- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install ".[doc]" | |
- name: Build docs | |
run: mkdocs build | |
- name: Upload static docs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: docs | |
path: site | |
deploy: | |
name: Pulish docs if a release was made | |
runs-on: ubuntu-latest | |
if: "startsWith(github.ref, 'refs/tags/')" | |
needs: [build] | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Install python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
with: | |
key: mkdocs-material-${{ env.cache_id }} | |
path: .cache | |
restore-keys: | | |
mkdocs-material- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install ".[doc]" | |
- name: Deploy to github pages | |
run: mkdocs gh-deploy --force |