mirror of
https://github.com/zoriya/zmk.git
synced 2025-12-06 06:56:11 +00:00
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>
11 lines
462 B
Bash
Executable File
11 lines
462 B
Bash
Executable File
#!/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 |