mirror of
https://github.com/tiktok/sparo.git
synced 2024-11-14 19:35:12 -05:00
Merge pull request #22 from tiktok/octogonz/website-ci
Fix an issue where the website project did not get built by CI
This commit is contained in:
commit
134626ef93
2 changed files with 24 additions and 0 deletions
22
apps/website/build.js
Normal file
22
apps/website/build.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
const { spawnSync } = require('child_process');
|
||||
|
||||
function runCommand(command, args) {
|
||||
const result = spawnSync(command, args, { stdio: 'inherit', shell: true });
|
||||
if (result.error) {
|
||||
console.log(result.error.message);
|
||||
process.exitCode = 1;
|
||||
return false;
|
||||
}
|
||||
process.exitCode = result.status;
|
||||
return result.status ? false : true;
|
||||
}
|
||||
|
||||
const docusaurusPath = __dirname + '/node_modules/.bin/docusaurus';
|
||||
|
||||
console.log('docusaurus clear');
|
||||
runCommand(docusaurusPath, ['clear']);
|
||||
|
||||
console.log('docusaurus build');
|
||||
runCommand(docusaurusPath, ['build']);
|
||||
|
||||
console.log('done.');
|
|
@ -4,6 +4,8 @@
|
|||
"private": true,
|
||||
"description": "The Sparo documentation website",
|
||||
"scripts": {
|
||||
"_phase:build": "node build.js",
|
||||
"_phase:test": "",
|
||||
"docusaurus": "docusaurus",
|
||||
"start": "docusaurus start",
|
||||
"build": "docusaurus build",
|
||||
|
|
Loading…
Reference in a new issue