-
Notifications
You must be signed in to change notification settings - Fork 134
Expand file tree
/
Copy pathstorybook.ts
More file actions
32 lines (27 loc) · 1018 Bytes
/
storybook.ts
File metadata and controls
32 lines (27 loc) · 1018 Bytes
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
/*
* 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 { bkEnv, buildStorybookSite, compress, startGroup, storybookOutDir, yarnInstall } from '../../utils';
import { createDeploymentStatus, createOrUpdateDeploymentComment } from '../../utils/deployment';
void (async () => {
await yarnInstall();
if (bkEnv.isPullRequest) {
await createOrUpdateDeploymentComment({
state: 'pending',
});
} else {
await createDeploymentStatus({ state: 'pending' });
}
startGroup('Building storybook');
buildStorybookSite({
nodeEnv: bkEnv.isMainBranch ? 'production' : 'development',
});
await compress({
src: storybookOutDir,
dest: '.buildkite/artifacts/storybook.gz',
});
})();