Skip to content

Cleanup docs workflow #10

Cleanup docs workflow

Cleanup docs workflow #10

Workflow file for this run

name: documentation
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build:
name: Build documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
sparse-checkout: |
docs
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Set up Python runtime
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Set the date environmental variable
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- name: Set up build cache
uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- name: Install dependencies
run: sudo apt-get install pngquant
- name: Install Python dependencies
run: pip install -r requirements.txt
deploy:
name: Deploy documentation
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
run: mkdocs gh-deploy --force