This repository has been archived by the owner on Oct 2, 2024. It is now read-only.
Publish documentation #13
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: Publish documentation | |
on: | |
push: | |
branches: | |
- main | |
- gh-pages | |
tags: | |
- "**" | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- name: checkout docs-site | |
uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: pdm-project/setup-pdm@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: true | |
cache-dependency-path: | | |
pyproject.toml | |
- name: Install dependencies | |
run: | | |
pdm install | |
- name: Set git credentials | |
run: | | |
git config --global user.name "${{ github.actor }}" | |
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
- run: mike deploy dev --push | |
if: github.ref == 'refs/heads/main' | |
- run: mike deploy ${{ github.ref_name }} latest --update-aliases --push | |
if: startsWith(github.ref, 'refs/tags/') |