Bumps [abatilo/actions-poetry](https://github.com/abatilo/actions-poetry) from 3.0.1 to 4.0.0. - [Release notes](https://github.com/abatilo/actions-poetry/releases) - [Changelog](https://github.com/abatilo/actions-poetry/blob/master/.releaserc) - [Commits](https://github.com/abatilo/actions-poetry/compare/e78f54a89cb052fff327414dd9ff010b5d2b4dbd...3765cf608f2d4a72178a9fc5b918668e542b89b1) --- updated-dependencies: - dependency-name: abatilo/actions-poetry dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
63 lines
2.1 KiB
YAML
63 lines
2.1 KiB
YAML
name: Build and Publish Docs
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- develop
|
|
workflow_dispatch:
|
|
release:
|
|
types: [published]
|
|
|
|
# Ensure only one concurrent deployment
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.ref}}
|
|
cancel-in-progress: true
|
|
|
|
# Restrict permissions by default
|
|
permissions:
|
|
contents: write # Required for committing to gh-pages
|
|
pages: write # Required for deploying to Pages
|
|
pull-requests: write # Required for PR comments
|
|
|
|
jobs:
|
|
deploy:
|
|
name: Publish Docs
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.10"]
|
|
steps:
|
|
- name: 📥 Checkout the repository
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: 🐍 Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: 📜 Setup Poetry
|
|
uses: abatilo/actions-poetry@3765cf608f2d4a72178a9fc5b918668e542b89b1 # v4.0.0
|
|
|
|
- name: 📦 Install dependencies
|
|
run: |
|
|
poetry install --with=docs
|
|
|
|
- name: ⚙️ Configure git for github-actions
|
|
run: |
|
|
git config --global user.name "github-actions[bot]"
|
|
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
|
|
- name: 🚀 Deploy Development Docs
|
|
if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') || github.event_name == 'workflow_dispatch'
|
|
run: |
|
|
MKDOCS_GIT_COMMITTERS_APIKEY=${{ secrets.GITHUB_TOKEN }} poetry run mike deploy --push develop
|
|
|
|
- name: 🚀 Deploy Release Docs
|
|
if: github.event_name == 'release' && github.event.action == 'published'
|
|
run: |
|
|
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
|
|
MKDOCS_GIT_COMMITTERS_APIKEY=${{ secrets.GITHUB_TOKEN }} poetry run mike deploy --push --update-aliases $latest_tag latest
|