Skip to content

Commit bc84150

Browse files
ci(docs): deploy site only on stable APM releases (#822)
* Initial plan * ci(docs): deploy site only on stable APM releases Agent-Logs-Url: https://github.com/microsoft/apm/sessions/14d49930-6ded-446d-826b-2e9de5fd314c Co-authored-by: danielmeppiel <51440732+danielmeppiel@users.noreply.github.com> * docs(changelog): shorten docs-deploy entry Agent-Logs-Url: https://github.com/microsoft/apm/sessions/e78aeb70-fef5-4b54-bb13-71921966c605 Co-authored-by: danielmeppiel <51440732+danielmeppiel@users.noreply.github.com> * docs(changelog): add PR number to docs-deploy entry Agent-Logs-Url: https://github.com/microsoft/apm/sessions/a3f48c9c-db2c-45b8-a2aa-ccef51a5561f Co-authored-by: danielmeppiel <51440732+danielmeppiel@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: danielmeppiel <51440732+danielmeppiel@users.noreply.github.com>
1 parent e6a9094 commit bc84150

2 files changed

Lines changed: 18 additions & 5 deletions

File tree

.github/workflows/docs.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
name: Deploy Docs
22

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

4245
- name: Upload build artifacts
43-
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
46+
if: |
47+
github.event_name == 'workflow_dispatch' ||
48+
(github.event_name == 'release' && github.event.release.prerelease == false)
4449
uses: actions/upload-pages-artifact@v3
4550
with:
4651
path: docs/dist
4752

4853
deploy:
4954
needs: build
50-
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
55+
# Only stable releases (or manual dispatch) update the public docs site,
56+
# so prerelease tags (vX.Y.Z-rc1, etc.) don't clobber published docs.
57+
if: |
58+
github.event_name == 'workflow_dispatch' ||
59+
(github.event_name == 'release' && github.event.release.prerelease == false)
5160
runs-on: ubuntu-latest
5261
permissions:
5362
pages: write

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
## [Unreleased]
1010

11+
### Changed
12+
13+
- Docs site publishes on stable release only, not every push to `main`. Closes #641 (#822)
14+
1115
## [0.9.0] - 2026-04-21
1216

1317
### Changed (BREAKING)

0 commit comments

Comments
 (0)