Skip to content

ci(docs): deploy site only on stable APM releases#822

Merged
danielmeppiel merged 5 commits intomainfrom
copilot/support-versioned-documentation-site
Apr 21, 2026
Merged

ci(docs): deploy site only on stable APM releases#822
danielmeppiel merged 5 commits intomainfrom
copilot/support-versioned-documentation-site

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 21, 2026

Description

Docs were redeployed on every push to main, so the public site routinely advertised features that didn't yet exist in the latest released binary (e.g. a v0.8.11 user followed apm marketplace add --host docs added post-release). Per the issue's step-1 plan, move docs publishing onto the release pipeline; full versioned-docs support is deferred to v1.0.

Changes in .github/workflows/docs.yml:

  • Trigger swapped from push: branches: [main], paths: ['docs/**'] to release: types: [published].
  • pull_request trigger retained as build-only (no upload, no deploy) so doc breakage is still caught pre-merge.
  • Both the artifact upload step and the deploy job gated on stable releases:
    if: |
      github.event_name == 'workflow_dispatch' ||
      (github.event_name == 'release' && github.event.release.prerelease == false)
    Prerelease tags (vX.Y.Zrc1, etc.) therefore won't clobber the public site.
  • workflow_dispatch preserved for manual republish.

CHANGELOG.md updated with a single concise line under [Unreleased] / Changed, following the repo's one-line-per-PR convention ending with (#822).

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally (YAML parses; trigger/condition logic reviewed against build-release.yml tag flow)
  • All existing tests pass (no code paths touched)
  • Added tests for new functionality (if applicable)

Agent-Logs-Url: https://github.com/microsoft/apm/sessions/14d49930-6ded-446d-826b-2e9de5fd314c

Co-authored-by: danielmeppiel <51440732+danielmeppiel@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for versioned documentation site ci(docs): deploy site only on stable APM releases Apr 21, 2026
Copilot AI requested a review from danielmeppiel April 21, 2026 19:37
Comment thread CHANGELOG.md Outdated
@danielmeppiel
Copy link
Copy Markdown
Collaborator

@copilot fix the review comment

@danielmeppiel danielmeppiel marked this pull request as ready for review April 21, 2026 20:03
Copilot AI review requested due to automatic review settings April 21, 2026 20:03
Agent-Logs-Url: https://github.com/microsoft/apm/sessions/e78aeb70-fef5-4b54-bb13-71921966c605

Co-authored-by: danielmeppiel <51440732+danielmeppiel@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/apm/sessions/a3f48c9c-db2c-45b8-a2aa-ccef51a5561f

Co-authored-by: danielmeppiel <51440732+danielmeppiel@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 21, 2026

@copilot fix the review comment

Updated the CHANGELOG entry to follow the one-line-per-PR convention with (#822) suffix in cebf2ee.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts the docs deployment workflow so the public documentation site reflects the latest released APM binary (addressing reported doc drift in #641), while still building docs on PRs to catch breakage before merge.

Changes:

  • Switch docs publishing trigger from push on main to release.published, with manual workflow_dispatch preserved.
  • Gate artifact upload + Pages deploy so only stable releases (non-prerelease) and manual dispatch publish.
  • Add a [Unreleased] changelog entry describing the new docs deployment behavior.
Show a summary per file
File Description
CHANGELOG.md Adds an Unreleased entry documenting the docs deployment trigger change.
.github/workflows/docs.yml Updates workflow triggers and deploy gating so Pages only updates on stable releases (or manual dispatch), with PRs building only.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 2

Comment thread CHANGELOG.md
Comment on lines +55 to +59
# 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)
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.
@danielmeppiel danielmeppiel merged commit bc84150 into main Apr 21, 2026
15 of 19 checks passed
@danielmeppiel danielmeppiel deleted the copilot/support-versioned-documentation-site branch April 21, 2026 20:23
danielmeppiel added a commit that referenced this pull request Apr 22, 2026
- Bump version to 0.9.1 in pyproject.toml and uv.lock
- Move CHANGELOG [Unreleased] entries into [0.9.1] - 2026-04-22
- Audit pass: 1 PR = 1 entry, no bloat
  - Consolidate the seven scattered entries from #832 into a single
    Added line that names the closed issues (#827/#829/#831/#834)
    and keeps the migration warning inline
  - Combine the three fork-PR fixes (#826, #836, #837) into one
    Fixed entry per the multi-PR convention
  - Drop the doc-only consolidation commits from the log

Highlights of 0.9.1:
- Install-time enforcement of org apm-policy.yml (#832)
- pr-review-panel automation now usable from fork PRs (#824, #826,
  #836, #837)
- Docs site publish gated on stable releases only (#822)
- Repository dogfooding via .apm/ as primitive source of truth (#823)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
danielmeppiel added a commit that referenced this pull request Apr 22, 2026
- Bump version to 0.9.1 in pyproject.toml and uv.lock
- Move CHANGELOG [Unreleased] entries into [0.9.1] - 2026-04-22
- Audit pass: 1 PR = 1 entry, no bloat
  - Consolidate the seven scattered entries from #832 into a single
    Added line that names the closed issues (#827/#829/#831/#834)
    and keeps the migration warning inline
  - Combine the three fork-PR fixes (#826, #836, #837) into one
    Fixed entry per the multi-PR convention
  - Drop the doc-only consolidation commits from the log

Highlights of 0.9.1:
- Install-time enforcement of org apm-policy.yml (#832)
- pr-review-panel automation now usable from fork PRs (#824, #826,
  #836, #837)
- Docs site publish gated on stable releases only (#822)
- Repository dogfooding via .apm/ as primitive source of truth (#823)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Support versioned documentation site

3 participants