acacha / forge-publish

Acacha Forge publish commands. Helps to publish projects on Laravel Forge. Test app: https://github.com/acacha/forge-publish-test
MIT License
4 stars 1 forks source link

Change autodeploy script #7

Closed acacha closed 7 years ago

acacha commented 7 years ago

Allow to add a script hook (file in local folde) to execute during deployment. Ens pot permetre per exemple executar un pull a repositories dependents o altres tasques que creiem convenient. MIllor script en local que no tenir que estar sempre modificant script de Laravel Forge

acacha commented 7 years ago

Default deploy script:

cd /home/forge/events.sergitur.2dam.iesebre.com
git pull origin master
echo "" | sudo -S service php7.1-fpm reload
acacha commented 7 years ago

Proposed new default script:

if [ -x ./pre-deploy.sh ]; then
  ./pre-deploy.sh
fi
cd /home/forge/forgepublish.sergitur.2dam.iesebre.com
git pull origin master
if [ -x ./post-deploy.sh ]; then
  ./post-deploy.sh
fi
echo "" | sudo -S service php7.1-fpm reload

if [ -x ./post-reload.sh ]; then
  ./post-reload.sh
fi
acacha commented 7 years ago

Done