Skip to content

fix(docs): deploy on tag push, not on the unreachable workflow_call branch#981

Merged
danielmeppiel merged 3 commits intomainfrom
fix/docs-deploy-workflow-call
Apr 27, 2026
Merged

fix(docs): deploy on tag push, not on the unreachable workflow_call branch#981
danielmeppiel merged 3 commits intomainfrom
fix/docs-deploy-workflow-call

Conversation

@danielmeppiel
Copy link
Copy Markdown
Collaborator

TL;DR

v0.9.4 docs auto-deploy SKIPPED silently. Deploy Docs / build ran successfully, Deploy Docs / deploy was skipped, and the public site still serves <0.9.4 content. Root cause: in a reusable workflow, github.event_name reflects the caller's event, not 'workflow_call'. Detect the tag-push context directly. Manual workflow_dispatch triggered to ship v0.9.4 docs in parallel with this PR.

Problem (WHY)

#953 fixed the missing release: published event for bot-cut releases by switching from a release-event trigger to a direct workflow_call invocation in build-release.yml. That was correct and necessary. But the gate inside docs.yml was never updated.

The if: on the upload-pages-artifact step and the deploy job reads:

github.event_name == 'workflow_dispatch' ||
(github.event_name == 'release' && github.event.release.prerelease == false) ||
(github.event_name == 'workflow_call' && inputs.is_prerelease == false)

Per GitHub Actions docs, in a reusable workflow the github context is inherited from the caller. When build-release.yml (triggered by push of a v* tag) calls docs.yml, inside docs.yml:

  • github.event_name == 'push' (NOT 'workflow_call')
  • github.ref_type == 'tag'
  • inputs.is_prerelease == false

None of the three branches match. Build runs (no condition gates the build job). Upload + deploy skip.

Verified

$ gh run view 24978104679 --json jobs --jq '.jobs[] | "\(.name): \(.status)/\(.conclusion)"' | grep Deploy
Deploy Docs / build:  completed/success
Deploy Docs / deploy: completed/skipped

$ curl -s https://microsoft.github.io/apm/reference/package-types/ | grep -oE 'id="[^"]*"'
id="apm-package-apm-directory"
id="skill-bundle-skillmd-at-root"
# (no 'skill-collection-...' anchor -- 0.9.4 content not deployed)

This is silently broken since #953 landed and is the second-order regression of the same root cause class — github.event_name not behaving like authors expect under workflow_call (#953 was the inverse: author expected release: published to fire under bot-cut releases).

Approach (WHAT)

Detect the tag-push context directly. Both build-release.yml:639 and build-release.yml:646 already gate the workflow_call invocation on github.ref_type == 'tag' && needs.create-release.outputs.is_prerelease != 'true', so the inputs are trustworthy.

- (github.event_name == 'workflow_call' && inputs.is_prerelease == false)
+ (github.event_name == 'push' && github.ref_type == 'tag' && inputs.is_prerelease == false)

Applied identically on the upload-artifact step and the deploy job.

Implementation (HOW)

.github/workflows/docs.yml — two surgical replacements + a comment explaining the gotcha for the next reader. Net: +13/-2.

Trade-offs

Choice Why Why not other
Detect via event_name == 'push' && ref_type == 'tag' Robust, no new inputs, matches the only legitimate caller path Could check inputs.* directly, but inputs always have defaults so no way to detect "actually invoked via workflow_call"
Keep workflow_dispatch and release: published branches Manual deploy + human-cut releases still work Could remove them, but they're cheap safety nets

Validation

  • Manual gh workflow run docs.yml --ref main triggered (run 24983311706) to ship v0.9.4 docs in parallel with this PR landing
  • Confirmed live site missing skill-collection-* anchor before fix
  • After merge: next stable release tag triggers automatic docs deploy with no skipped step

How to test

After merge, on the next stable release (or by re-tagging a no-op patch):

  1. gh run view <build-release-run> --json jobs --jq '.jobs[] | select(.name | startswith("Deploy Docs")) | "\(.name): \(.conclusion)"'
  2. Expect: Deploy Docs / build: success AND Deploy Docs / deploy: success (not skipped).

Related

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

…ranch

In a reusable workflow, `github.event_name` reflects the CALLER's
event (here: `push` of a v* tag from build-release.yml), NOT
`workflow_call`. The previous gate

  github.event_name == 'workflow_call' && inputs.is_prerelease == false

never matched on a release, so:
- the upload-pages-artifact step was skipped
- the deploy job was skipped

v0.9.4 release: 'Deploy Docs / build' succeeded, 'Deploy Docs / deploy'
SKIPPED. The site still serves <0.9.4 content (verified: 'Skill
collection' anchor missing from live page-types.html).

Detect the tag-push context directly:

  github.event_name == 'push' && github.ref_type == 'tag'
    && inputs.is_prerelease == false

Same fix on both the upload-artifact step and the deploy job. PR runs
(event_name == 'pull_request') still build-only because none of the
three branches match -- behavior preserved.

Manual workflow_dispatch triggered to ship v0.9.4 docs immediately.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 27, 2026 07:59
@danielmeppiel danielmeppiel added this to the 0.9.5 milestone Apr 27, 2026
@danielmeppiel danielmeppiel added area/ci-cd GitHub workflows, merge queue, gh-aw integrations, release pipeline. area/docs-site docs/src/content (Starlight), README, doc generation. type/bug Something does not work as documented. labels Apr 27, 2026
danielmeppiel added a commit that referenced this pull request Apr 27, 2026
… docs are live

v0.9.4 docs deploy completed (manual workflow_dispatch run 24983311706
after the underlying skip bug was identified -- fix in #981). The live
page now exposes #skill-collection-skillsnameskillmd, so we can land
readers exactly on the heading that documents the skills/<name>/SKILL.md
layout npx skills users already know.

Verified live:
  curl -s .../reference/package-types/ | grep -oE 'id="skill[^"]*"'
  -> id="skill-bundle-skillmd-at-root"
  -> id="skill-collection-skillsnameskillmd"

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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

Fixes a regression where the docs site was not deploying after bot-cut releases once the docs workflow was converted to a reusable workflow (workflow_call). The change updates the deploy gating to correctly detect the tag-push caller context so upload + deploy run for stable tag releases again.

Changes:

  • Update .github/workflows/docs.yml upload/deploy if: gates to detect stable tag-push context (caller event) instead of an unreachable workflow_call branch.
  • Add explanatory comments in docs.yml documenting the reusable-workflow github.* context gotcha.
  • Add an Unreleased changelog entry describing the docs auto-deploy fix.
Show a summary per file
File Description
CHANGELOG.md Adds an Unreleased “Fixed” entry for the docs auto-deploy regression.
.github/workflows/docs.yml Adjusts artifact upload + deploy conditions to run on stable tag-based release calls and documents the workflow_call context behavior.

Copilot's findings

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

Comment thread CHANGELOG.md Outdated
danielmeppiel added a commit that referenced this pull request Apr 27, 2026
* docs(readme): add 'Coming from npx skills add?' conversion block

Surgical insert between the apm.yml example and the three promises -- the
funnel moment where npx-skills users decide whether to switch. Names
vercel-labs/agent-skills and the real 'deploy-to-vercel' skill so the claim
is verifiable in 30 seconds. Bold inline lead (no h3) keeps the page flow
intact for non-npx readers; one outbound link defers prose to docs.

Both commands verified locally end-to-end: whole-bundle install integrates
7 skills; --skill deploy-to-vercel integrates 1 and persists the subset
into apm.yml + apm.lock.yaml's skill_subset.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs(readme): drop fragment, link to package-types page root

Copilot reviewer caught: #skill-bundle was wrong on two counts.
1. Rendered anchor is #skill-bundle-skillmd-at-root, not #skill-bundle --
   slugifier strips parens/dots/dashes differently than expected.
2. That heading documents the SKILL.md-at-root shape, but npx skills'
   layout is documented under 'Skill collection (skills/<name>/SKILL.md)'
   further down the same page.

The 'Skill collection' anchor exists in source (added in 0.9.4) but is
not deployed yet -- v0.9.4 docs auto-deploy from #953 is mid-rollout.
Linking to the page root is robust today and lands on the right doc;
both shapes are visible without a scroll.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs(readme): fix broken anchor in npx skills add conversion block

Agent-Logs-Url: https://github.com/microsoft/apm/sessions/6725d577-cad3-4772-b2d5-d1d6bf44e926

Co-authored-by: danielmeppiel <51440732+danielmeppiel@users.noreply.github.com>

* docs(readme): restore precise #skill-collection anchor now that 0.9.4 docs are live

v0.9.4 docs deploy completed (manual workflow_dispatch run 24983311706
after the underlying skip bug was identified -- fix in #981). The live
page now exposes #skill-collection-skillsnameskillmd, so we can land
readers exactly on the heading that documents the skills/<name>/SKILL.md
layout npx skills users already know.

Verified live:
  curl -s .../reference/package-types/ | grep -oE 'id="skill[^"]*"'
  -> id="skill-bundle-skillmd-at-root"
  -> id="skill-collection-skillsnameskillmd"

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
danielmeppiel and others added 2 commits April 27, 2026 10:14
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@danielmeppiel danielmeppiel merged commit 059be28 into main Apr 27, 2026
7 checks passed
@danielmeppiel danielmeppiel deleted the fix/docs-deploy-workflow-call branch April 27, 2026 08:24
danielmeppiel pushed a commit that referenced this pull request Apr 27, 2026
Promotes [Unreleased] to [0.10.0] - 2026-04-27. Each PR since v0.9.4
gets one 'so what' line:

- #926 Microsoft 365 Cowork target ships impl
- #790 marketplace authoring CLI (init, package add/set, build, check,
  outdated, doctor, publish) -- collapsed from 20+ bullets to one
- #722 marketplace plugin -> package rename + --help sectioning -- collapsed
- #980 README 'Coming from npx skills add' conversion block
- #981 docs auto-deploy on tag push (real fix for the #953 attempt)
- #985 pr-description-skill evals suite
- #984 pr-description-skill mermaid hardening
- #989 cowork sys.platform mock for Windows CI

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

area/ci-cd GitHub workflows, merge queue, gh-aw integrations, release pipeline. area/docs-site docs/src/content (Starlight), README, doc generation. type/bug Something does not work as documented.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants