v1.1.1 #10
Workflow file for this run
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
--- | |
# This workflow will build and deploy the documentation to GitHub Pages | |
name: Deployment | |
# yamllint disable-line rule:truthy | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: Release version | |
required: true | |
type: string | |
release: | |
types: [published] | |
env: | |
DEFAULT_PYTHON: "3.11" | |
jobs: | |
build-docs: | |
name: Build documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: β€΅οΈ Check out code from GitHub | |
uses: actions/[email protected] | |
- name: π Set up Poetry | |
run: pipx install poetry | |
- name: π Set up Python ${{ env.DEFAULT_PYTHON }} | |
id: python | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
cache: "poetry" | |
- name: π Install workflow dependencies | |
run: | | |
poetry config virtualenvs.create true | |
poetry config virtualenvs.in-project true | |
- name: π Install dependencies | |
run: poetry install --no-interaction | |
- name: π Configure Git | |
run: | | |
git config --global user.name "${{ secrets.GIT_COMMITTER_NAME }}" | |
git config --global user.email "${{ secrets.GIT_COMMITTER_EMAIL }}" | |
- name: π Deploy new version with Mike | |
run: | | |
VERSION=${{ github.event.release.tag_name || github.event.inputs.version }} | |
VERSION=${VERSION#v} # Verwijder de 'v' prefix | |
MINOR_VERSION=$(echo $VERSION | awk -F. '{print $1 ".x"}') | |
poetry run mike deploy --push --update-aliases latest $VERSION | |
poetry run mike alias --push latest $MINOR_VERSION | |
- name: β¬οΈ Upload pages artifacts | |
uses: actions/[email protected] | |
with: | |
path: site | |
deploy: | |
name: Deploy to GitHub Pages | |
runs-on: ubuntu-latest | |
needs: build-docs | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: ποΈ Setup Github Pages | |
uses: actions/[email protected] | |
- name: π Deploy to Github Pages | |
uses: actions/[email protected] | |
id: deployment |