Created
May 10, 2023 15:23
-
-
Save kas-cor/0f406e14bad743545403cb0f4e3b97ea to your computer and use it in GitHub Desktop.
Self PHP Deploy
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
#!/bin/sh | |
# Developer deploy, if change in dev branch then run deploy_dev.sh | |
cd /path/to/site && git fetch | |
if [[ $(git log --oneline -n1 dev..origin/dev) ]]; then | |
echo Delpoy dev... | |
./deploy_dev.sh | |
fi | |
# Prodaction deploy, if change in master branch then run deploy_prod.sh | |
cd /path/to/site && git fetch | |
if [[ $(git log --oneline -n1 master..origin/master) ]]; then | |
echo Delpoy prod... | |
./deploy_prod.sh | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment