-
Notifications
You must be signed in to change notification settings - Fork 134
Expand file tree
/
Copy pathbuild_release_site.ts
More file actions
38 lines (31 loc) · 1.21 KB
/
build_release_site.ts
File metadata and controls
38 lines (31 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import path from 'path';
import { assembleSite, buildDocsSite, buildStorybookSite, buildTypeDocs } from '../utils/site';
const releaseSiteDir = path.resolve(__dirname, '../../.release-site');
/**
* Builds the release-ready static site consumed by the GitHub release workflow.
* The assembled output matches the published GitHub Pages layout with docs at
* the root and Storybook under `/storybook`.
*/
console.log('Building release-ready docs');
buildTypeDocs();
buildDocsSite({
docsUrl: 'https://elastic.github.io',
baseUrl: '/elastic-charts',
nodeEnv: 'production',
});
console.log('Building release-ready Storybook');
buildStorybookSite({
nodeEnv: 'production',
});
console.log('Assembling release site');
assembleSite({
outDir: releaseSiteDir,
});
console.log(`Release site assembled at ${path.relative(path.resolve(__dirname, '../..'), releaseSiteDir)}`);