Created
July 3, 2013 15:01
-
-
Save purplefish32/5918954 to your computer and use it in GitHub Desktop.
Symfony deploy script
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/bash | |
cd .. | |
git fetch origin | |
git checkout origin/master | |
cd deploy/ | |
rm composer.phar | |
curl -sS https://getcomposer.org/installer | php | |
cd .. | |
php deploy/composer.phar install | |
php app/console innova:dev-fixtures:load | |
php app/console assets:install --symlink | |
php app/console assetic:dump | |
php app/console cache:clear --env=prod --no-debug | |
echo ' | |
_____ | |
(__) / \ | |
(@o) ( Done! ) | |
/-------\/ --" \_____/ | |
/ | || | |
* ||----|| | |
^^ ^^ | |
' | |
<?php | |
try | |
{ | |
$payload = json_decode($_REQUEST['payload']); | |
} | |
catch(Exception $e) | |
{ | |
exit(0); | |
} | |
//log the request | |
file_put_contents('../deploy/logs/github.log', print_r($payload, TRUE), FILE_APPEND); | |
if ($payload->ref === 'refs/heads/master') | |
{ | |
// path to your site deployment script | |
exec('../deploy.sh > ../deploy/logs/php-deploy.log'); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment