Update project management tools #3
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
name: docs | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build docs from main | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: extractions/setup-just@v2 | |
- uses: astral-sh/setup-uv@v5 | |
- name: Build docs | |
run: | | |
just docs | |
- name: Deploy docs preview to Netlify | |
if: | | |
github.event.pull_request != null | |
uses: nwtgck/actions-netlify@v2.0.0 | |
with: | |
publish-dir: "./docs/site" | |
production-deploy: false | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-message: "Deploy from GitHub Actions" | |
enable-pull-request-comment: true | |
enable-commit-comment: false | |
overwrites-pull-request-comment: true | |
alias: deploy-preview-${{ github.event.number }} | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
timeout-minutes: 1 | |
- name: Deploy production docs to gh-pages | |
if: | | |
github.event.pull_request == null | |
working-directory: docs | |
run: | | |
git fetch origin gh-pages --depth=1 | |
git config user.name github-actions[bot] | |
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
uv run --no-dev --group docs --isolated \ | |
--directory docs/ \ | |
mike deploy --push ~latest --title=latest |