Skip to content

Commit ced102d

Browse files
authored
chore: Deploy docs to production (#9357)
* Deploy docs production * Slight logo update * Remove trailing slash
1 parent e28533b commit ced102d

File tree

5 files changed

+18
-43
lines changed

5 files changed

+18
-43
lines changed

.circleci/config.yml

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -494,21 +494,6 @@ jobs:
494494
paths:
495495
- '*/storybook-s2/'
496496

497-
docs-production:
498-
executor: rsp-xlarge
499-
steps:
500-
- restore_cache:
501-
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
502-
503-
- run:
504-
name: build docs
505-
command: make website-production
506-
507-
- persist_to_workspace:
508-
root: dist
509-
paths:
510-
- '*/docs/'
511-
512497
s2-docs:
513498
executor: rsp-xlarge
514499
steps:
@@ -838,26 +823,6 @@ jobs:
838823
done
839824
fi
840825
841-
deploy-production:
842-
docker:
843-
- image: mcr.microsoft.com/azure-cli:2.63.0
844-
steps:
845-
- attach_workspace:
846-
at: /tmp/dist
847-
- run:
848-
name: Install AzCopy
849-
command: |
850-
wget -O azcopy.tar.gz https://aka.ms/downloadazcopy-v10-linux
851-
tar -xf azcopy.tar.gz
852-
mv ./azcopy_linux_amd64_*/azcopy /usr/local/bin/
853-
- run:
854-
name: deploy
855-
command: |
856-
azcopy copy "/tmp/dist/production/docs/*" "https://reactspectrum.blob.core.windows.net/\$web${AZURE_STORAGE_SAS_TOKEN}" --recursive --exclude-pattern "*.md;*.txt;*.html;*.rsc"
857-
azcopy copy "/tmp/dist/production/docs/*" "https://reactspectrum.blob.core.windows.net/\$web${AZURE_STORAGE_SAS_TOKEN}" --recursive --include-pattern "*.md" --content-type "text/markdown; charset=utf-8" --cache-control "max-age=300"
858-
azcopy copy "/tmp/dist/production/docs/*" "https://reactspectrum.blob.core.windows.net/\$web${AZURE_STORAGE_SAS_TOKEN}" --recursive --include-pattern "*.txt" --content-type "text/plain; charset=utf-8" --cache-control "max-age=300"
859-
azcopy copy "/tmp/dist/production/docs/*" "https://reactspectrum.blob.core.windows.net/\$web${AZURE_STORAGE_SAS_TOKEN}" --recursive --include-pattern "*.html;*.rsc" --cache-control "max-age=300"
860-
861826
deploy-s3-stage:
862827
executor: rsp
863828
steps:
@@ -868,6 +833,16 @@ jobs:
868833
dir: s2
869834
bucket: s3://react-spectrum-stage
870835

836+
deploy-s3-production:
837+
executor: rsp
838+
steps:
839+
- deploy-s3:
840+
dir: react-aria
841+
bucket: s3://react-aria-production
842+
- deploy-s3:
843+
dir: s2
844+
bucket: s3://react-spectrum-production
845+
871846
comment:
872847
executor: rsp
873848
steps:
@@ -1085,18 +1060,18 @@ workflows:
10851060
- equal: [ "workflow_dispatch", << pipeline.parameters.GHA_Event >>]
10861061
jobs:
10871062
- install
1088-
- docs-production:
1063+
- s2-docs-production:
10891064
filters:
10901065
branches:
10911066
only: main
10921067
requires:
10931068
- install
1094-
- deploy-production:
1069+
- deploy-s3-production:
10951070
filters:
10961071
branches:
10971072
only: main
10981073
requires:
1099-
- docs-production
1074+
- s2-docs-production
11001075

11011076
nightly:
11021077
triggers:

packages/dev/docs/src/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function getBaseUrl(library) {
6767
url.pathname = publicUrl.replace(/\/$/, '') + url.pathname.replace(/\/$/, '');
6868
base = url.href;
6969
}
70-
return base;
70+
return base.replace(/\/$/, '');
7171
}
7272

7373
export function getAnchorProps(href) {
Lines changed: 1 addition & 1 deletion
Loading

packages/dev/s2-docs/pages/s2/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ export const hideFromSearch = true;
3939
author: 'Adobe Inc',
4040
headline: 'React Spectrum',
4141
description,
42-
// image: ogImage,
42+
image: `${getBaseUrl('s2')}/og/index.png`,
4343
publisher: {
4444
'@type': 'Organization',
4545
url: 'https://www.adobe.com',
4646
name: 'Adobe',
47-
logo: rspFavicon
47+
logo: 'https://www.adobe.com/favicon.ico'
4848
}
4949
}
5050
)}} />

packages/dev/s2-docs/src/icons/ReactAriaLogo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {style, StyleString} from '@react-spectrum/s2/style' with {type: 'macro'}
55
export const ReactAriaLogo = ({styles}: {styles?: StyleString}) => {
66
return (
77
<svg className={mergeStyles(style({size: 24, flexShrink: 0, display: 'block'}), styles)} viewBox="200 206 800 790" fill="none">
8-
<path d="M720.977 206C867.87 206 986.95 325.079 986.951 471.971C986.951 590.705 909.147 691.263 801.743 725.455L996.496 969.116C1004.8 979.509 997.403 994.897 984.099 994.897H783.931C774.667 994.897 765.864 990.85 759.834 983.817L697.676 911.329L493.465 653.333C457.478 607.867 489.857 540.938 547.842 540.936L720.977 540.93C759.061 540.93 789.934 510.054 789.934 471.971C789.933 433.888 759.06 403.016 720.977 403.016H430.286C405.305 403.016 388.975 391.865 374.349 373.604L277.717 252.964C262.564 234.046 276.032 206.001 300.27 206H720.977Z M396.955 720.641C408.147 705.343 430.789 704.78 442.726 719.504L504.152 796.942H503.124L535.902 838.852C548.405 854.274 550.274 877.104 538.38 893.001L469.156 982.565C463.145 990.343 453.87 994.897 444.041 994.897H215.9C202.668 994.897 195.246 979.656 203.405 969.239L338.351 796.942H338.281L396.955 720.641Z" fill="light-dark(#6733FF, #7F57FF)" />
8+
<path d="M720.67 205.995C867.583 205.995 986.679 325.091 986.68 472.003C986.68 590.753 908.865 691.325 801.446 725.521L979.312 948.055C994.438 966.98 980.963 995 956.736 995H795.612C778.743 995 762.715 987.629 751.734 974.823L697.365 911.421L493.126 653.39C457.134 607.918 489.518 540.979 547.511 540.977L720.67 540.971C758.758 540.971 789.635 510.091 789.635 472.003C789.634 433.915 758.758 403.038 720.67 403.038H429.939C404.955 403.038 388.623 391.886 373.994 373.623L277.349 252.966C262.194 234.045 275.664 205.996 299.905 205.995H720.67Z M396.605 720.706C407.798 705.406 430.443 704.843 442.381 719.568L503.816 797.018H502.786L535.569 838.934C548.074 854.358 549.943 877.191 538.047 893.09L476.638 972.545C465.692 986.707 448.803 995 430.903 995H242.276C218.18 995 204.665 967.248 219.523 948.278L337.992 797.018H337.923L396.605 720.706Z" fill="light-dark(#6733FF, #7F57FF)" />
99
</svg>
1010
);
1111
};

0 commit comments

Comments
 (0)