From 79b9da4ec0d22de06f936102a542bc33eb014387 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Fri, 3 Oct 2025 14:15:42 -0700 Subject: [PATCH 1/4] docs: Prepare S2 docs deploy --- Makefile | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index b73134edfeb..01c43275953 100644 --- a/Makefile +++ b/Makefile @@ -109,6 +109,8 @@ website: website-production: node scripts/buildWebsite.js $$PUBLIC_URL cp packages/dev/docs/pages/robots.txt dist/production/docs/robots.txt + # Uncomment this when we are ready to release. + # $(MAKE) s2-docs-production $(MAKE) starter-zip $(MAKE) tailwind-starter $(MAKE) s2-storybook-docs @@ -144,12 +146,18 @@ s2-api-diff: node scripts/api-diff.js --skip-same --skip-style-props s2-docs: + BASE_URL=https://reactspectrum.blob.core.windows.net PUBLIC_URL=/reactspectrum/$$(git rev-parse HEAD)/s2-docs DIST_DIR=dist/$$(git rev-parse HEAD) $(MAKE) build-s2-docs + +s2-docs-production: + BASE_URL=https://react-spectrum.adobe.com PUBLIC_URL=/beta DIST_DIR=dist/production/docs/beta $(MAKE) build-s2-docs + +build-s2-docs: yarn workspace @react-spectrum/s2-docs generate:md yarn workspace @react-spectrum/s2-docs generate:og - REGISTRY_URL=https://reactspectrum.blob.core.windows.net/reactspectrum/$$(git rev-parse HEAD)/s2-docs/registry node scripts/buildRegistry.mjs - REGISTRY_URL=https://reactspectrum.blob.core.windows.net/reactspectrum/$$(git rev-parse HEAD)/s2-docs/registry yarn build:s2-docs --public-url /reactspectrum/$$(git rev-parse HEAD)/s2-docs/ - mkdir -p dist/$$(git rev-parse HEAD) - mv packages/dev/s2-docs/dist dist/$$(git rev-parse HEAD)/s2-docs - mkdir -p dist/$$(git rev-parse HEAD)/s2-docs/registry - mv starters/docs/registry dist/$$(git rev-parse HEAD)/s2-docs/registry/vanilla - mv starters/tailwind/registry dist/$$(git rev-parse HEAD)/s2-docs/registry/tailwind + REGISTRY_URL=$(BASE_URL)$(PUBLIC_URL)/registry node scripts/buildRegistry.mjs + REGISTRY_URL=$(BASE_URL)$(PUBLIC_URL)/registry yarn build:s2-docs --public-url $(PUBLIC_URL) + mkdir -p $(DIST_DIR) + mv packages/dev/s2-docs/dist/* $(DIST_DIR) + mkdir -p $(DIST_DIR)/registry + mv starters/docs/registry $(DIST_DIR)/registry/vanilla + mv starters/tailwind/registry $(DIST_DIR)/registry/tailwind From c36fda4471d0eff38fdf008a49bffd4b7ababb3f Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Fri, 3 Oct 2025 14:30:19 -0700 Subject: [PATCH 2/4] fix --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 01c43275953..ff0cea55c58 100644 --- a/Makefile +++ b/Makefile @@ -146,7 +146,7 @@ s2-api-diff: node scripts/api-diff.js --skip-same --skip-style-props s2-docs: - BASE_URL=https://reactspectrum.blob.core.windows.net PUBLIC_URL=/reactspectrum/$$(git rev-parse HEAD)/s2-docs DIST_DIR=dist/$$(git rev-parse HEAD) $(MAKE) build-s2-docs + BASE_URL=https://reactspectrum.blob.core.windows.net PUBLIC_URL=/reactspectrum/$$(git rev-parse HEAD)/s2-docs DIST_DIR=dist/$$(git rev-parse HEAD)/s2-docs $(MAKE) build-s2-docs s2-docs-production: BASE_URL=https://react-spectrum.adobe.com PUBLIC_URL=/beta DIST_DIR=dist/production/docs/beta $(MAKE) build-s2-docs From 6c0b1332622f3ded8e9eb67137767d20fa9552e9 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Thu, 9 Oct 2025 15:46:14 -0700 Subject: [PATCH 3/4] Add beta-docs CI job --- .circleci/config.yml | 38 ++++++++++++++++++++++++++++++++ .github/workflows/beta-docs.yaml | 15 +++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .github/workflows/beta-docs.yaml diff --git a/.circleci/config.yml b/.circleci/config.yml index b7665dbc8f5..9d0247aa747 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -478,6 +478,21 @@ jobs: paths: - '*/docs/' + docs-beta: + executor: rsp-xlarge + steps: + - restore_cache: + key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} + + - run: + name: build docs + command: make s2-docs-production + + - persist_to_workspace: + root: dist + paths: + - '*/docs/' + s2-docs: executor: rsp-xlarge steps: @@ -1018,6 +1033,29 @@ workflows: requires: - docs-production + + beta-docs: + when: + and: + - equal: [ "beta-docs", << pipeline.parameters.GHA_Action >> ] + - or: + - equal: [ "release", << pipeline.parameters.GHA_Event >>] + - equal: [ "workflow_dispatch", << pipeline.parameters.GHA_Event >>] + jobs: + - install + - docs-beta: + filters: + branches: + only: beta-docs + requires: + - install + - deploy-production: + filters: + branches: + only: beta-docs + requires: + - docs-beta + nightly: triggers: - schedule: diff --git a/.github/workflows/beta-docs.yaml b/.github/workflows/beta-docs.yaml new file mode 100644 index 00000000000..5ecf301ef2c --- /dev/null +++ b/.github/workflows/beta-docs.yaml @@ -0,0 +1,15 @@ +name: Beta docs deploy +on: + release: + types: [published] + workflow_dispatch: + +jobs: + trigger-circleci: + runs-on: ubuntu-latest + steps: + - name: Run CircleCI + id: beta-docs + uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.0.5 + env: + CCI_TOKEN: ${{ secrets.CCI_TOKEN }} From 579049be2cd5d5da7856be5cf64237fb70831852 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Thu, 9 Oct 2025 15:50:27 -0700 Subject: [PATCH 4/4] fix --- .circleci/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9d0247aa747..8e55af664ea 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1038,9 +1038,6 @@ workflows: when: and: - equal: [ "beta-docs", << pipeline.parameters.GHA_Action >> ] - - or: - - equal: [ "release", << pipeline.parameters.GHA_Event >>] - - equal: [ "workflow_dispatch", << pipeline.parameters.GHA_Event >>] jobs: - install - docs-beta: