FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
storybook/scripts/build-frontpage.js at next · javascriptit/storybook · GitHub
javascriptit
storybook
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
storybook
/
scripts
/
build-frontpage.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
19 lines (16 loc) · 563 Bytes
Breadcrumbs
storybook
/
scripts
/
build-frontpage.js
Copy path
File metadata and controls
executable file
·
19 lines (16 loc) · 563 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env node
/* eslint-disable no-console */
const
fetch
=
require
(
'node-fetch'
)
;
const
{
CIRCLE_BRANCH
,
FRONTPAGE_WEBHOOK
}
=
process
.
env
;
console
.
log
(
'build-frontpage'
)
;
if
(
CIRCLE_BRANCH
===
'master'
)
{
if
(
FRONTPAGE_WEBHOOK
)
{
console
.
log
(
'triggering frontpage build'
)
;
const
url
=
`https://api.netlify.com/build_hooks/
${
FRONTPAGE_WEBHOOK
}
`
;
fetch
(
url
,
{
method
:
'post'
}
)
.
then
(
res
=>
console
.
log
(
'result'
,
res
.
status
)
)
;
}
else
{
console
.
log
(
'no webhook defined'
)
;
}
}
else
{
console
.
log
(
'skipping branch'
,
CIRCLE_BRANCH
)
;
}
Back
|
FazBrowse Home
|
New Git URL