Skip to content

feat: github actions #4

feat: github actions

feat: github actions #4

Workflow file for this run

name: Docs
on:
push:
branches:
- main
concurrency:
group: github-pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v5
- name: "Set up Python"
uses: actions/setup-python@v6
with:
python-version-file: "pyproject.toml"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Sync dependencies
run: uv sync --group docs
- name: Build static files
run: uv run mkdocs build
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v4
with:
path: site/
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
cleanup:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: strumwolf/delete-deployment-environment@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: github-pages
onlyRemoveDeployments: true