diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 118bcb011..c3a668275 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -40,9 +40,6 @@ jobs: - name: Test library run: cd lib && npm run test - - name: Build website - run: cd website && yarn build - - name: Publish RELEASE to npm run: | sed -i "s#\"version\": \"0.0.0\"#\"version\": \"${TAG_NAME}\"#" ./dist/package.json diff --git a/scripts/release-website.js b/scripts/release-website.js index 7895bb597..382e4ec02 100644 --- a/scripts/release-website.js +++ b/scripts/release-website.js @@ -54,16 +54,19 @@ const getVersionsInS3Bucket = async () => { const buildSite = (version) => { return new Promise((resolve, reject) => { - console.log(`Building site with version ${version}/`); - exec(`SITE_VERSION=${version} yarn build`, (error, stdout, stderr) => { - if (error) { - throw new Error(error.message); - } - if (stderr) { - throw new Error(stderr); + console.log(`Building site with version ${version}`); + exec( + `cd website && SITE_VERSION=${version} yarn build`, + (error, stdout, stderr) => { + if (error) { + throw new Error(error.message); + } + if (stderr) { + throw new Error(stderr); + } + resolve(stdout); } - resolve(stdout); - }); + ); }); };