mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-15 21:36:36 +00:00
Limit design site builds (#11120)
This commit is contained in:
parent
6fc87a6f66
commit
5c488f8298
4
.github/workflows/netflify.yml
vendored
4
.github/workflows/netflify.yml
vendored
@ -15,5 +15,5 @@ jobs:
|
||||
- name: Trigger Demo build
|
||||
run: curl -X POST -d {} https://api.netlify.com/build_hooks/${{ secrets.NETLIFY_DEMO_DEV_BUILD_HOOK }}
|
||||
|
||||
- name: Trigger Gallery build
|
||||
run: curl -X POST -d {} https://api.netlify.com/build_hooks/${{ secrets.NETLIFY_GALLERY_DEV_BUILD_HOOK }}
|
||||
- name: Trigger Design build
|
||||
run: curl -X POST -d "NIGHTLY" https://api.netlify.com/build_hooks/${{ secrets.NETLIFY_GALLERY_DEV_BUILD_HOOK }}
|
||||
|
@ -17,9 +17,7 @@ function createStatus() {
|
||||
}
|
||||
|
||||
|
||||
if [[ "${PULL_REQUEST}" == "false" ]]; then
|
||||
gulp build-gallery
|
||||
else
|
||||
if [[ "${PULL_REQUEST}" == "true" ]]; then
|
||||
if [[ "$(curl -sSLf -H "Accept: application/vnd.github.v3+json" -H "Authorization: token $GITHUB_TOKEN" \
|
||||
"https://api.github.com/repos/home-assistant/frontend/pulls/${REVIEW_ID}" | jq '.labels[].name' -r)" =~ "$TARGET_LABEL" ]]; then
|
||||
createStatus "pending" "Building design preview" "https://app.netlify.com/sites/home-assistant-gallery/deploys/$BUILD_ID"
|
||||
@ -32,4 +30,6 @@ else
|
||||
else
|
||||
createStatus "success" "Build was not requested by PR label"
|
||||
fi
|
||||
elif [[ "${$INCOMING_HOOK_BODY}" == "NIGHTLY" ]]; then
|
||||
gulp build-gallery
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user