Skip to content

Commit 89d0277

Browse files
committed
branch deploy
1 parent 3452f93 commit 89d0277

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

scripts/deploy-branch.js

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,12 @@ set('-v');
88

99
var branch = process.env.BRANCH_NAME && process.env.BRANCH_NAME.toLowerCase();
1010
if (branch && branch !== 'gh-pages') {
11-
var branchPath = path.join('.tmp', 'preview', branch, '/');
12-
mkdir('-p', branchPath);
13-
cp('-R', 'web/*', branchPath);
14-
exec('npm run swagger bundle -- -o ' + branchPath + 'swagger.json');
11+
var branchPath = path.join('.tmp', 'preview', branch, '/');
12+
mkdir('-p', branchPath);
13+
cp('-R', 'web/*', branchPath);
14+
exec('redocly build-docs ./spec/openapi.yaml -o ' + branchPath + 'index.html');
15+
exec('redocly bundle ./spec/openapi.yaml -o ' + branchPath + 'swagger.yaml');
16+
exec('redocly bundle ./spec/openapi.yaml -o ' + branchPath + 'swagger.json');
1517

16-
var specFolder = path.join(branchPath, 'spec');
17-
mkdir('-p', specFolder);
18-
cp('-R', 'spec/translation_quality', specFolder);
19-
cp('-R', 'spec/file_translation', specFolder);
20-
cp('-R', 'spec/issues', specFolder);
21-
cp('-R', 'spec/job_batches_v1', specFolder);
22-
cp('-R', 'spec/job_batches_v2', specFolder);
23-
cp('-R', 'spec/glossary_v3', specFolder);
24-
cp('-R', 'spec/api_common.yaml', specFolder);
25-
26-
exec('deploy-to-gh-pages --update .tmp');
18+
exec('deploy-to-gh-pages --update .tmp');
2719
}

0 commit comments

Comments
 (0)