Deploy docs directly from the repo #123
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: Deploy homepage | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'docs/**' | |
- 'zeus/**' | |
- 'mkdocs.yml' | |
- 'Dockerfile' | |
- '.github/workflows/deploy_homepage.yaml' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
if: github.event.repository.fork == false | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
cache: 'pip' | |
- 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 mkdocs-material-insiders | |
env: | |
GH_TOKEN: ${{ secrets.MKDOCS_MATERIAL_INSIDERS_PAT }} | |
run: pip install git+https://${GH_TOKEN}@github.com/jaywonchung/mkdocs-material-insiders.git@9.1.21-insiders-4.38.1 | |
- name: Install other homepage dependencies | |
run: pip install -r docs/requirements.txt | |
- name: Build homepage | |
run: mkdocs gh-deploy --force |