Update and Deploy GitHub Pages #51
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: Update and Deploy GitHub Pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
- main | |
workflow_run: | |
workflows: ["Update Submodules", "Update API Changelog"] | |
types: | |
- completed | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
# k8s hosted Arc Runner not installed git for checking out submodules, see issue #2 | |
runs-on: arc-runner-k8s | |
# runs-on: self-hosted | |
steps: | |
- name: Force update git | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y software-properties-common | |
sudo add-apt-repository -y ppa:git-core/ppa | |
sudo apt-get update | |
sudo apt-get install -y git | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- 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- | |
- run: pip install -r requirements.txt | |
- run: mkdocs gh-deploy --force | |