Skip to content

ci

ci #1

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
# Allow running manually
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Poetry
run: pip install poetry
- name: Use in-project virtualenv
run: poetry config virtualenvs.in-project true
- uses: actions/cache@v4
with:
path: .venv/
key: ${{ runner.os }}-pip-${{ hashFiles('poetry.lock') }}-${{ hashFiles('pyproject.toml') }}
- name: Install dependencies
run: poetry install
- name: Setup Pages
uses: actions/configure-pages@v1
- name: Build
run: poetry run mkdocs build
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./site
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs:
- build
if: github.ref_name == 'main'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1