Skip to content

v1.1.1

v1.1.1 #10

Workflow file for this run

---
# 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