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
7 changes: 3 additions & 4 deletions .github/workflows/publish-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ jobs:
- name: Install dependencies
run: npm install

- name: Build library
- name: Build library and website
env:
NEXT_PUBLIC_SITE_VERSION: next
run: npm run build

- name: Build website
run: cd apps/website && SITE_VERSION=next npm run build

- name: Test library
run: npm run test
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/publish-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ jobs:
- name: Install dependencies
run: npm install

- name: Build library
- name: Build library and website
env:
NEXT_PUBLIC_SITE_VERSION: next
run: npm run build

- name: Build website
run: cd apps/website && SITE_VERSION=next npm run build

- name: Move website to S3
run: |
Expand Down
4 changes: 2 additions & 2 deletions apps/website/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ module.exports = {
return config;
},
reactStrictMode: true,
assetPrefix: process.env.NODE_ENV === "production" ? `/halstack/${process.env.SITE_VERSION}` : undefined,
basePath: process.env.NODE_ENV === "production" ? `/halstack/${process.env.SITE_VERSION}` : undefined,
assetPrefix: process.env.NODE_ENV === "production" ? `/halstack/${process.env.NEXT_PUBLIC_SITE_VERSION}` : undefined,
basePath: process.env.NODE_ENV === "production" ? `/halstack/${process.env.NEXT_PUBLIC_SITE_VERSION}` : undefined,
transpilePackages: [
"@cloudscape-design/components",
"@cloudscape-design/component-toolkit",
Expand Down
2 changes: 1 addition & 1 deletion apps/website/screens/common/sidenav/SidenavLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { DxcBadge, DxcFlex } from "@dxc-technology/halstack-react";
type SidenavLogoProps = { subtitle?: string };

const SidenavLogo = ({ subtitle = "Design System" }: SidenavLogoProps): JSX.Element => {
const pathVersion = process.env.SITE_VERSION;
const pathVersion = process.env.NEXT_PUBLIC_SITE_VERSION;
const isDev = process.env.NODE_ENV === "development";

return (
Expand Down
4 changes: 2 additions & 2 deletions scripts/release-website.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const buildSite = (version) => {
return new Promise((resolve, reject) => {
console.log(`Building site with version ${version}`);
exec(
`cd apps/website && SITE_VERSION=${version} npm run build`,
`cd apps/website && NEXT_PUBLIC_SITE_VERSION=${version} npm run build`,
(error, stdout, stderr) => {
if (error) {
throw new Error(error.message);
Expand Down Expand Up @@ -131,7 +131,7 @@ const deploy = async () => {
);
const existingVersionsInBucket = await getVersionsInS3Bucket();
const isNewLatest = !existingVersionsInBucket.includes(majorVersionToDeploy);
await buildSite(versionToDeploy);
await buildSite(majorVersionToDeploy);
await removeBucket(majorVersionToDeploy);
await moveToBucket(majorVersionToDeploy);
const listAvailableVersions = await getVersionsInS3Bucket();
Expand Down
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"tasks": {
"build": {
"dependsOn": ["^build"],
"env": ["SITE_VERSION", "NODE_ENV"],
"env": ["NEXT_PUBLIC_SITE_VERSION", "NODE_ENV"],
"inputs": ["$TURBO_DEFAULT$", ".env", ".env.*", "!**/*.stories.{tsx,jsx,mdx}"],
"outputs": [".next/**", "!.next/cache/**", "dist/**", "storybook-static/**"]
},
Expand Down