ci: use tagged action #24
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
name: Docs | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- .github/workflows/docs.yml | |
- CHANGELOG.md | |
- docs/** | |
- LICENSE | |
- mkdocs.yml | |
- pyproject.toml | |
- README.md | |
- src/** | |
- Taskfile.yml | |
- uv.lock | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
env: | |
TASK_X_REMOTE_TASKFILES: 1 | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
container: ghcr.io/nikaro/gha:latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup uv | |
uses: astral-sh/setup-uv@v3 | |
- name: Build doc | |
run: task gendoc --yes | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: './site' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |