nixin-web/bin/push-to-prod.sh

13 lines
356 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
2024-09-26 08:31:24 +00:00
# push main to prod (which will trigger the deploy action)
CURR_BRANCH=$(git symbolic-ref --short HEAD)
if [[ ${CURR_BRANCH} == "main" ]]; then
echo pushing main to prod...
git checkout prod
git merge --ff-only main
git push origin prod
git checkout main
else
echo "This script is meant to be run from the main branch!"
fi