Skip to content

Use type keyword when defining types #89

Use type keyword when defining types

Use type keyword when defining types #89

name: Build PR Docs Preview
# Splitting the preview docs build into an (untrusted) build step (this one)
# and a trusted deployment step helps prevent a class of issues that allow
# secret exfiltration from a repo.
# See https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/
permissions:
contents: read
# When a new update is made to this PR, cancel any still-running builds from previous pushes
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
paths:
- 'docs/**'
- 'spy/cli/**' # Rebuild cli docs when cli changes
- '.github/workflows/docs**'
types:
- opened
- synchronize
- reopened
workflow_dispatch:
jobs:
build-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v8.1.0
with:
enable-cache: true
- name: Install venv
run: |
uv sync --no-dev --group docs --locked
- name: Build and mkdocs
run: |
uv run mkdocs build --config-file docs/mkdocs.yml --site-dir ./site -v
- name: Upload preview artifact
uses: actions/upload-artifact@v4
with:
name: pr-preview-docs-${{ github.event.number }}
path: docs/site
if-no-files-found: error
retention-days: 7