Fix README.md links (#24) #1
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
# yaml-language-server: $schema=https://github.com/SchemaStore/schemastore/raw/master/src/schemas/json/github-workflow.json | |
# MkDocs-Material Workflow | |
# - Uses latest Python/pip | |
# - Caches for Python/pip and MkDocs | |
# - Installs MkDocs dependencies | |
name: MkDocs | |
on: | |
push: | |
branches: [ main ] # Only run on main branch | |
paths: # Only run changes in these directories | |
- docs/** | |
- '**.md' | |
- mkdocs.yml | |
# Allows to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
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 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' # use latest Python3 version | |
check-latest: true # use latest version | |
cache: pip # cache pip dependencies | |
- name: Export cache_id | |
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | |
- name: Cache MkDocs | |
uses: actions/cache@v4 | |
id: mkdocs-material-cache | |
continue-on-error: true | |
with: | |
key: mkdocs-material-${{ env.cache_id }} | |
path: .cache | |
restore-keys: | | |
mkdocs-material- | |
- name: Cache Hit State | |
if: ${{ steps.mkdocs-material-cache.outputs.cache-hit != 'true' }} | |
continue-on-error: true | |
run: echo "No Cache Hit!" | |
- name: Upgrade Pip | |
continue-on-error: true | |
run: python -m pip install --upgrade --no-input --quiet --quiet --quiet pip | |
- name: Material for MkDocs Setup | |
continue-on-error: true | |
run: pip install --upgrade --no-input --quiet --quiet --quiet mkdocs-material | |
- name: Material for MkDocs Dependencies Setup | |
continue-on-error: true | |
run: pip install --upgrade --no-input --quiet --quiet --quiet $(mkdocs --no-color --quiet get-deps) | |
#- name: Upgrade Packages | |
# continue-on-error: true | |
# pip list --outdated --no-color | tail --lines=+3 | cut --delimiter=" " --fields=1 | xargs --max-args=1 pip install --upgrade --quiet --quiet --quiet | |
- name: Deploy Site | |
run: mkdocs gh-deploy --force | |
# Disable MkDocs Cache as this repo isn't running a standard installation | |
# id: mkdocs-material-cache | |
# env: cache-name: mkdocs-material-cache | |
# with: | |
# path: .cache | |
# key: ${{ env.cache-name }}-${{ hashFiles('requirements.txt') }} | |
# restore-keys: ${{ env.cache-name }}- | |
# # mkdocs --no-color --quiet get-deps >requirements.txt |