-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(ci): Netlify ignore command to check branch (#2659)
Add a separate ignore script that checks git changes but also only deploys main and version branches to allow us to deploy versioned docs. Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
- Loading branch information
1 parent
4fcc308
commit 6934e36
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
# We deploy main, version branches and deploy previews only | ||
if echo $HEAD | grep -E '^(main|v[[:digit:]]+\.([[:digit:]])+-branch)$' || echo $CONTEXT | grep '^deploy-preview$' | ||
then | ||
echo "Head '$HEAD' matches a deployed branch, or context is deploy preview, checking for git changes." | ||
git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../app/boards/ | ||
else | ||
echo "Head '$HEAD' does not match a deployed branch and is not a deploy preview" | ||
exit 0 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters