Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Deploy Docs

on:
push:
branches: [main]
paths: ['docs/**']
# Deploy docs only when a new APM version is released, so the published
# site always matches the latest released binary (see microsoft/apm#641).
# PR runs build (no deploy) to catch breakage before merge. Manual
# workflow_dispatch is supported for re-publishing the current docs.
release:
types: [published]
pull_request:
paths: ['docs/**']
workflow_dispatch:
Expand Down Expand Up @@ -40,14 +43,20 @@ jobs:
run: npm run build

- name: Upload build artifacts
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'release' && github.event.release.prerelease == false)
uses: actions/upload-pages-artifact@v3
with:
path: docs/dist

deploy:
needs: build
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
# Only stable releases (or manual dispatch) update the public docs site,
# so prerelease tags (vX.Y.Z-rc1, etc.) don't clobber published docs.
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'release' && github.event.release.prerelease == false)
Comment on lines +55 to +59
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that PR runs are build-only, consider tightening GitHub token permissions for non-deploy events. With workflow-level pages: write / id-token: write, the pull_request build job still receives elevated permissions it doesn't need; prefer leaving workflow/build at contents: read and granting pages: write + id-token: write only on the deploy job.

Copilot uses AI. Check for mistakes.
runs-on: ubuntu-latest
permissions:
pages: write
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Docs site publishes on stable release only, not every push to `main`. Closes #641 (#822)
Comment thread
danielmeppiel marked this conversation as resolved.

## [0.9.0] - 2026-04-21

### Changed (BREAKING)
Expand Down
Loading