Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -1018,6 +1033,26 @@ workflows:
requires:
- docs-production


beta-docs:
when:
and:
- equal: [ "beta-docs", << pipeline.parameters.GHA_Action >> ]
jobs:
- install
- docs-beta:
filters:
branches:
only: beta-docs
requires:
- install
- deploy-production:
filters:
branches:
only: beta-docs
requires:
- docs-beta

nightly:
triggers:
- schedule:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/beta-docs.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
22 changes: 15 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)/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

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