headscale/.github/workflows/docs.yml

45 lines
1,003 B
YAML
Raw Normal View History

2023-03-27 18:37:25 +00:00
name: Build documentation
2024-03-13 12:43:06 +00:00
2023-03-27 18:37:25 +00:00
on:
push:
branches:
- main
2024-05-31 21:39:07 +00:00
paths:
- 'docs/**'
- pyproject.toml
- poetry.lock
2023-03-27 18:37:25 +00:00
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
2024-03-13 12:43:06 +00:00
uses: actions/checkout@v4
2024-05-31 21:39:07 +00:00
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run tests
run: nix develop --command -- poetry run mkdocs build --strict
2023-03-27 18:37:25 +00:00
- name: Upload artifact
2024-03-22 18:50:35 +00:00
uses: actions/upload-pages-artifact@v3
2023-03-27 18:37:25 +00:00
with:
path: ./site
2024-03-13 12:43:06 +00:00
2023-03-27 18:37:25 +00:00
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
2024-03-22 18:50:35 +00:00
- name: Configure Pages
uses: actions/configure-pages@v4
2023-03-27 18:37:25 +00:00
- name: Deploy to GitHub Pages
id: deployment
2024-03-13 12:43:06 +00:00
uses: actions/deploy-pages@v4