Skip to content

Commit 2fcfe25

Browse files
authored
Merge pull request #1326 from dxc-technology/marcialfps-publish-release-fix
Fix website build in release-website script
2 parents 8f4e799 + bf223f7 commit 2fcfe25

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

.github/workflows/publish-release.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ jobs:
4040
- name: Test library
4141
run: cd lib && npm run test
4242

43-
- name: Build website
44-
run: cd website && yarn build
45-
4643
- name: Publish RELEASE to npm
4744
run: |
4845
sed -i "s#\"version\": \"0.0.0\"#\"version\": \"${TAG_NAME}\"#" ./dist/package.json

scripts/release-website.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,19 @@ const getVersionsInS3Bucket = async () => {
5454

5555
const buildSite = (version) => {
5656
return new Promise((resolve, reject) => {
57-
console.log(`Building site with version ${version}/`);
58-
exec(`SITE_VERSION=${version} yarn build`, (error, stdout, stderr) => {
59-
if (error) {
60-
throw new Error(error.message);
61-
}
62-
if (stderr) {
63-
throw new Error(stderr);
57+
console.log(`Building site with version ${version}`);
58+
exec(
59+
`cd website && SITE_VERSION=${version} yarn build`,
60+
(error, stdout, stderr) => {
61+
if (error) {
62+
throw new Error(error.message);
63+
}
64+
if (stderr) {
65+
throw new Error(stderr);
66+
}
67+
resolve(stdout);
6468
}
65-
resolve(stdout);
66-
});
69+
);
6770
});
6871
};
6972

0 commit comments

Comments
 (0)