Skip to content

Deploy to gh-pages

Deploy to gh-pages #20

Workflow file for this run

name: Deploy to gh-pages
on:
workflow_dispatch:
inputs:
dry-run:
type: boolean
description: Dry run (will build to 'gh-pages-test')
default: true
permissions:
contents: write
env:
INPUTS_DRYRUN: ${{ inputs.dry-run }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- 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-
- run: mkdocs gh-deploy $(if ${INPUTS_DRYRUN};then echo "-b gh-pages-test --verbose";fi) --force