Skip to content

Commit

Permalink
cd: restart services if last commit message includes "!restart"
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Nov 27, 2023
1 parent ef27015 commit c2ca135
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/toolforge-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
echo "Updating jobs.yml ...";
toolforge-jobs load jobs.yml;
fi;
if [[ "$(git diff --name-only HEAD HEAD@{1} | grep -c eventstream)" -gt 0 ]]; then
if [[ "$(git diff --name-only HEAD HEAD@{1} | grep -c eventstream)" -gt 0 || "$(git rev-list --format=%B --max-count=1 HEAD)" == *"!restart"* ]]; then
echo "Restarting eventstream-router ...";
cd eventstream-router && npm restart && cd -;
fi;
Expand All @@ -67,7 +67,7 @@ jobs:
exit 1;
fi;
npm restart;
elif [[ "$(git diff --name-only HEAD HEAD@{1} | grep -c "web-endpoint")" -gt 0 ]]; then
elif [[ "$(git diff --name-only HEAD HEAD@{1} | grep -c "web-endpoint")" -gt 0 || "$(git rev-list --format=%B --max-count=1 HEAD)" == *"!restart"* ]]; then
echo "Restarting SDZeroBot webservice ...";
cd /data/project/sdzerobot/www/js && npm restart;
fi;
Expand Down

0 comments on commit c2ca135

Please sign in to comment.