feat: v2 workflows#29
Merged
Merged
Conversation
c95dbb4 to
b4b2b8f
Compare
e1135bb to
e378cb1
Compare
e378cb1 to
38a509f
Compare
38a509f to
95a653b
Compare
6cc1ad9 to
b0fbb55
Compare
This was referenced May 5, 2026
timkim
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Reintroduces #23 (previously reverted in #25 because the in-place rewrite broke v1 callers). Ships the changes as versioned files (*-v2.yml) alongside v1, so content repos can opt into v2 on their own schedule.
Ticket
https://jira.corp.adobe.com/browse/DEVSITE-2292
Related PRs
Test branches
Tests
Setup (testing artifact only): For this validation pass, the test repos
adp-devsite-branch-protection-testandadp-dev-docs-privatehave both v1 and v2 workflows installed so v1 regression and v2 can be exercised side-by-side. A normal content repo ships only one set. Becausepush: maintriggers bothdeploy.ymlanddeploy-v2.ymlin parallel, disable the set you're not testing via Actions → workflow → kebab menu → Disable workflow:deploy.yml,stage.yml,build-auto-generated-files.yml)deploy-v2.yml,stage-v2.yml,build-auto-generated-files-v2.yml)Once all phases pass, delete the v1 workflows from these test repos so they converge on v2.
Phase 0 — Local dev
npm run dev(public repo)adp-devsite-branch-protection-test2. Run
npm run devbuildContributorsroutes tobuildContributorsV2fromadp-devsite-utils#v2-workflowscontributors.json+adp-site-metadata.jsongenerated locally; no API auth errorsnpm run dev(private repo)adp-dev-docs-private2. Run
npm run devcontributors.json+adp-site-metadata.jsongenerated locallyPhase 1 — v2, no branch protection
Repo:
adp-devsite-branch-protection-test(AdobeDocs, public). Bothdeploy-v2.ymlandbuild-auto-generated-files-v2.ymlusesecrets: inherit— Phase 1 therefore validates the inherit pattern end-to-end..mdfile insrc/pages/2. Commit and push to main
secrets: inherit• echo-state:
Has App Secrets = true,Deploy to prod = true,Deploy to stage = false• Bot commits:
chore: auto-generate contributors+chore: auto-generate site metadata• Prod deploy steps ran
• Deploy processes ONLY the user-pushed
.md(not the bot'scontributors.json/adp-site-metadata.json) — verifiessha: head_shafilter on changed-filesauto-generatecommitsif: github.actor != 'adp-devsite-app[bot]'guard on thedeploymentjob blocks bot-triggered deploys)workflow_dispatch, baseSha provided, deployAll unchecked2. Enter a SHA from a few commits back in
baseSha3. Leave
deployAllunchecked4. Run
Base Shain echo-state matches provided value; delta build runs from that SHAnpm warn deprecated glob@10.5.0warnings may appear in build-contributors log - known issue, DEVSITE-2381)workflow_dispatch, deployAll checked2. Leave
baseShaempty, checkdeployAll3. Run
Deploy All = truein echo-state; full rebuild runs (--all); allsrc/pages/files deployedworkflow_dispatch, env:stage & prod2. Select
env: stage & prod3. Enter a SHA from a few commits back in
baseSha(leaving it empty triggers a knownchanged-filesshallow-clone bug - tracked in DEVSITE-2379)4. Leave
deployAllunchecked5. Run
Deploy to stage = true,Deploy to prod = true(both flags set viacontains(inputs.env, ...))• Stage steps ran (preview + cache-bust)
• Prod 2-step deploy ran (preview → sleep → live)
• Both stage and prod environments updated in a single run
Phase 1b — Fork PR (core DEVSITE-2292 scenario)
V2 fixes fork PR failures by removing
pull_requestfrombuild-auto-generated-files-v2.yml(auto-gen now only runs at deploy time, called viaworkflow_callfrom the deploy workflow). The linter bot also moved to aworkflow_runtrigger so it can comment on fork PRs without needing fork-side write access. These tests verify the PR-time experience is clean for both forks and internal branches.src/pageschangesadp-devsite-branch-protection-test2. Edit a
.mdfile insrc/pages/3. Open a PR against main
Lintcheck runs•
Build Auto-Generated Filescheck NOT present (v2build-auto-generated-files-v2.ymlhas nopull_requesttrigger)• No secrets-related failures
• If lint warnings found:
Post Linter Reportbot posts a comment — confirmsworkflow_run-based posting works cross-forkPhase 2 — Branch protection
2. Create a feature branch, edit a
.mdfile insrc/pages/3. Open a PR against main and merge it
adp-devsite-branch-protection-test)build-auto-generated-filessucceeds (bot's app-token push allowed by App's bypass); bot commit in history; deploy completes2. Create a feature branch, edit a
.mdfile insrc/pages/3. Open a PR against main and merge it
build-contributorsfails on git push (push rejected — App lacks bypass)•
build-site-metadatastill runs (not skipped —if: always()) and also fails on git push — confirmsneeds: build-contributors+if: always()chain•
deploystill runs (if: always()) and deploys the user's merge commit (no auto-gen file updates in branch)Phase 3 — No app secrets
Setup: Disable branch protection if it was left on from Phase 2 — Phase 3 reuses Phase 1's setup (no protection) so a direct push to main can trigger the workflow.
ADP_DEVSITE_APP_IDrepo secret2. Push a markdown change to main
ADP_DEVSITE_APP_IDnot setHas App Secrets = falsein echo-state;build-auto-generated-filesskipped; deploy completes successfullyPhase 4 — AdobeDocsPrivate cross-org
adp-dev-docs-privateroutes throughAdobeDocsPrivate/adp-devsite-workflow-private/.github/workflows/deploy-v2.yml@v2-workflows— a parallel implementation that always full-rebuilds, deploys to Azure (not AEM), explicitly copiesstatic/, and doesn't auto-gen on push. Build-auto-gen uses explicit secret passing (free-plan AdobeDocsPrivate constraint); deploy usessecrets: inherit.workflow_dispatch(env=prod)test-v2-workflowsbranch2. Leave
envas default (prod)adp-dev-docs-private), app secrets set as repo-level secretsmatrix_prep→set-state→echo-state→pre-build→build• echo-state:
Deploy to prod = true,Deploy to stg = false,Repository org = AdobeDocsPrivate,Path prefixpopulated fromconfig.md•
buildjob: full site rebuilt, static assets copied, Azure deploy completed against prod connection string, Fastly cache purged usingAIO_FASTLY_PROD_URLworkflow_dispatchviastage-v2.ymltest-v2-workflowsbranchDeploy to stg = true,Deploy to prod = false•
buildjob runs full rebuild• "Select Connection String" step picks
AIO_AZURE_DEV_PRIVATE_CONNECTION_STRING(stage)• Azure deploy targets stage (dev) Blob Storage
• Fastly purge uses
AIO_FASTLY_DEV_URLstatic/file to mainstatic/inadp-dev-docs-private(e.g.static/foo.json)2. Commit and push to main
buildjob runs full rebuild (private workflow has no changed-files filter)• "Copy spec, data, and static media files" step copies
static/foo.jsoninto_site/{pathPrefix}/static/foo.json(preservesstatic/prefix)• Deployed to Azure at
{pathPrefix}/static/foo.json• File accessible via runtime connector at
developer-stage.adobe.com/{pathPrefix}/static/foo.json(private repos serve static via runtime connector; public repos fetch via raw GitHub instead)Phase 5 — Staging (stage-v2.yml)
workflow_dispatchviastage-v2.yml, no baseShaadp-devsite-branch-protection-test(caller calls shared workflow at@test-v2-workflows)2. Leave
baseShaempty, leavedeployAllunchecked3. Run
Deploy to stage = true,Deploy to prod = falsein echo-state;Base Shafrom last successfulstage-v2.ymlrun (independent of deploy baseline); auto-gen runs; stage deploy completesPhase 6 — v1 workflows
Regression coverage — verifies that v2 changes to
adp-devsite-utils(newbuildContributorsV2function) and shared workflow restructuring don't break v1 callers still on the unchanged code paths.npm run dev(old)2. Run
npm run dev