chains/scripts/check-deploy.sh
ligi 78c6e74dfb Squashed 'website/' content from commit 363240a
git-subtree-dir: website
git-subtree-split: 363240aff0185a5593cb828a19cd6dfaceb8bc6c
2023-01-17 16:07:59 +01:00

11 lines
348 B
Bash
Executable File

#!/bin/bash
shouldDeploy=$(curl -s https://api.github.com/repos/ethereum-lists/chains/commits/master | jq -r "((now - (.commit.author.date | fromdateiso8601) ) / (60*60*24) | trunc)")
if [ $shouldDeploy -eq 0 ]
then
echo "Deploying..."
curl -X POST -d '{}' https://api.netlify.com/build_hooks/${BUILD_HOOK}
else
echo "No deploy needed"
fi