Skip to content
Merged
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
27 changes: 7 additions & 20 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
name: Deploy Docs

on:
# Deploy docs only when a new APM version is released, so the published
# site always matches the latest released binary (see microsoft/apm#641).
# Primary entrypoint is workflow_call from the CI/CD Pipeline release job
# (release: published does not fire when the release is created by
# GITHUB_TOKEN -- a documented Actions safeguard against recursion).
# The release: published trigger is kept as a safety net for human-cut
# releases. PR runs build (no deploy) to catch breakage before merge.
# Manual workflow_dispatch is supported for re-publishing the current docs.
# Keep release/manual/reusable invocations build-only: do not publish the
# normal docs site. PR #21's progress-page updates are the only automatic
# GitHub Pages publication path from this workflow.
workflow_call:
inputs:
is_prerelease:
Expand Down Expand Up @@ -65,25 +60,17 @@ jobs:
# context instead. PR runs (event_name == 'pull_request') correctly
# build-only because none of the three branches match.
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event_name == 'release' && github.event.release.prerelease == false) ||
(github.event_name == 'push' && github.ref_type == 'tag' && inputs.is_prerelease == false)
github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: docs/dist

deploy:
needs: build
# Only stable releases (or manual dispatch) update the public docs site,
# so prerelease tags (vX.Y.Z-rc1, etc.) don't clobber published docs.
# NOTE: in a reusable workflow, github.event_name reflects the CALLER's
# event ('push' of a v* tag from build-release.yml), NOT 'workflow_call'.
# Only PR #21 progress-page updates on main publish to GitHub Pages.
# Release/manual/reusable invocations build but do not deploy normal docs.
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event_name == 'release' && github.event.release.prerelease == false) ||
(github.event_name == 'push' && github.ref_type == 'tag' && inputs.is_prerelease == false)
github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
pages: write
Expand Down
Loading