Skip to content

Commit 1e6a140

Browse files
authored
ci: netlify.sh (#67)
1 parent d6c99ae commit 1e6a140

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

netlify.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
echo "is netlify: $NETLIFY"
3+
echo "in branch: $BRANCH"
4+
echo "head: $HEAD"
5+
6+
if [ "$NETLIFY" != "true" ]
7+
then
8+
echo "this script only runs in netlify, bye"
9+
exit 1
10+
fi
11+
12+
if [ "$BRANCH" != "dev" ] && [ "$HEAD" != "dev" ]
13+
then
14+
yarn build:file && yarn deploy:build
15+
else
16+
echo "this script only runs in targeting dev's PR deploy preview, bye"
17+
fi

0 commit comments

Comments
 (0)