Skip to content

Commit 9725008

Browse files
committed
Merge remote-tracking branch 'origin/main' into feature/vsc-ext-native-improvements
# Conflicts: # .github/workflows/publish.yml
2 parents 2f5822a + 3446b76 commit 9725008

38 files changed

Lines changed: 679 additions & 407 deletions

.changeset/add-cip-topic-and-reports.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.changeset/decouple-json-from-logs.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/github-actions.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/prophet-ide-integration.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/scapi-discovery-tools.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ on:
55
branches:
66
- main
77
- 'renovate/**'
8+
- 'release/**'
89
pull_request:
910
branches:
1011
- main
12+
- 'release/**'
1113

1214
permissions:
1315
contents: read
@@ -58,6 +60,9 @@ jobs:
5860
- name: Build packages
5961
run: pnpm -r run build
6062

63+
- name: Build documentation
64+
run: pnpm run docs:build
65+
6166
- name: Run SDK tests
6267
id: sdk-test
6368
working-directory: packages/b2c-tooling-sdk

.github/workflows/deploy-docs.yml

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212

1313
concurrency:
1414
group: pages
15-
cancel-in-progress: false
15+
cancel-in-progress: true
1616

1717
jobs:
1818
build:
@@ -54,20 +54,39 @@ jobs:
5454
- name: Get latest release tag
5555
id: release
5656
run: |
57-
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
57+
# Find the most recent package tag and docs tag by creation date.
58+
# This is safe because only @latest publishes and doc-only releases
59+
# trigger this workflow — maintenance patches on older minors are
60+
# excluded by the publish workflow gate.
61+
PKG_TAG=$(git tag --list '@salesforce/*' --sort=-creatordate | head -n1)
62+
DOCS_TAG=$(git tag --list 'docs@*' --sort=-creatordate | head -n1)
63+
64+
# Pick whichever tag was created more recently
65+
LATEST_TAG=""
66+
if [[ -n "$PKG_TAG" && -n "$DOCS_TAG" ]]; then
67+
LATEST_TAG=$(git tag --list '@salesforce/*' --list 'docs@*' --sort=-creatordate | head -n1)
68+
elif [[ -n "$PKG_TAG" ]]; then
69+
LATEST_TAG="$PKG_TAG"
70+
elif [[ -n "$DOCS_TAG" ]]; then
71+
LATEST_TAG="$DOCS_TAG"
72+
fi
73+
74+
echo "Latest package tag: ${PKG_TAG:-<none>}"
75+
echo "Latest docs tag: ${DOCS_TAG:-<none>}"
76+
echo "Building stable docs from: ${LATEST_TAG:-<none>}"
77+
5878
echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT
5979
echo "exists=$([[ -n $LATEST_TAG ]] && echo true || echo false)" >> $GITHUB_OUTPUT
6080
61-
- name: Build main documentation
62-
run: pnpm run docs:build
63-
env:
64-
RELEASE_VERSION: ${{ steps.release.outputs.tag }}
81+
- name: Build dev documentation
82+
run: |
83+
IS_DEV_BUILD=true pnpm run docs:build
84+
mv docs/.vitepress/dist docs/.vitepress/dist-dev
6585
66-
- name: Build release documentation
86+
- name: Build stable documentation from release tag
6787
if: steps.release.outputs.exists == 'true'
6888
run: |
69-
# Save main build and config (config has version dropdown code)
70-
mv docs/.vitepress/dist docs/.vitepress/dist-main
89+
# Save config from main (has version dropdown and dynamic base path)
7190
cp docs/.vitepress/config.mts /tmp/config.mts
7291
7392
# Remove S3-extracted uxstudio files before checkout to avoid conflicts
@@ -87,14 +106,17 @@ jobs:
87106
# Restore config from main (has version dropdown and dynamic base path)
88107
cp /tmp/config.mts docs/.vitepress/config.mts
89108
90-
# Build at release tag with main's config
109+
# Build at release tag with main's config (no IS_DEV_BUILD = stable at root)
91110
pnpm install --frozen-lockfile
92111
pnpm -r run build
93-
RELEASE_VERSION=${{ steps.release.outputs.tag }} IS_RELEASE_BUILD=true pnpm run docs:build
112+
pnpm run docs:build
113+
114+
# Combine: stable at root, dev in /dev/
115+
mv docs/.vitepress/dist-dev docs/.vitepress/dist/dev
94116
95-
# Combine: main at root, release in /release/
96-
mv docs/.vitepress/dist docs/.vitepress/dist-main/release
97-
mv docs/.vitepress/dist-main docs/.vitepress/dist
117+
- name: Use dev as root when no release exists
118+
if: steps.release.outputs.exists != 'true'
119+
run: mv docs/.vitepress/dist-dev docs/.vitepress/dist
98120

99121
- name: Upload artifact
100122
uses: actions/upload-pages-artifact@v3

0 commit comments

Comments
 (0)