|
1 | 1 | name: Deploy Docs |
2 | 2 |
|
3 | 3 | on: |
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 | | - # Primary entrypoint is workflow_call from the CI/CD Pipeline release job |
7 | | - # (release: published does not fire when the release is created by |
8 | | - # GITHUB_TOKEN -- a documented Actions safeguard against recursion). |
9 | | - # The release: published trigger is kept as a safety net for human-cut |
10 | | - # releases. PR runs build (no deploy) to catch breakage before merge. |
11 | | - # Manual workflow_dispatch is supported for re-publishing the current docs. |
| 4 | + # Keep release/manual/reusable invocations build-only: do not publish the |
| 5 | + # normal docs site. PR #21's progress-page updates are the only automatic |
| 6 | + # GitHub Pages publication path from this workflow. |
12 | 7 | workflow_call: |
13 | 8 | inputs: |
14 | 9 | is_prerelease: |
@@ -65,25 +60,17 @@ jobs: |
65 | 60 | # context instead. PR runs (event_name == 'pull_request') correctly |
66 | 61 | # build-only because none of the three branches match. |
67 | 62 | if: | |
68 | | - github.event_name == 'workflow_dispatch' || |
69 | | - (github.event_name == 'push' && github.ref == 'refs/heads/main') || |
70 | | - (github.event_name == 'release' && github.event.release.prerelease == false) || |
71 | | - (github.event_name == 'push' && github.ref_type == 'tag' && inputs.is_prerelease == false) |
| 63 | + github.event_name == 'push' && github.ref == 'refs/heads/main' |
72 | 64 | uses: actions/upload-pages-artifact@v3 |
73 | 65 | with: |
74 | 66 | path: docs/dist |
75 | 67 |
|
76 | 68 | deploy: |
77 | 69 | needs: build |
78 | | - # Only stable releases (or manual dispatch) update the public docs site, |
79 | | - # so prerelease tags (vX.Y.Z-rc1, etc.) don't clobber published docs. |
80 | | - # NOTE: in a reusable workflow, github.event_name reflects the CALLER's |
81 | | - # event ('push' of a v* tag from build-release.yml), NOT 'workflow_call'. |
| 70 | + # Only PR #21 progress-page updates on main publish to GitHub Pages. |
| 71 | + # Release/manual/reusable invocations build but do not deploy normal docs. |
82 | 72 | if: | |
83 | | - github.event_name == 'workflow_dispatch' || |
84 | | - (github.event_name == 'push' && github.ref == 'refs/heads/main') || |
85 | | - (github.event_name == 'release' && github.event.release.prerelease == false) || |
86 | | - (github.event_name == 'push' && github.ref_type == 'tag' && inputs.is_prerelease == false) |
| 73 | + github.event_name == 'push' && github.ref == 'refs/heads/main' |
87 | 74 | runs-on: ubuntu-latest |
88 | 75 | permissions: |
89 | 76 | pages: write |
|
0 commit comments