-
Notifications
You must be signed in to change notification settings - Fork 0
HowTo
blackout314 edited this page Dec 12, 2014
·
7 revisions
- create id_rsa.pub for www-data
$ su www-data
$ ssh-keygen
- secure your .ssh dir -> edit .htaccess
RewriteEngine on
RewriteRule .*\.ssh/.*$ - [R=404]
- go bitbucket.org and insert id_rsa.pub in allowed keys
- from shell
$ git clone https://github.com/GrayHats/bitbucket-deploy-php.git
- edit deploy.php
$options = array(
'log' => 'deployments.log',
'date_format' => 'Y-m-d H:i:sP',
'branch' => 'master',
'remote' => 'origin',
);
- create posts hook
$deploy->post_deploy = function() use ($deploy) {
exec('curl http://www.foobar.com/wp-admin/upgrade.php?step=upgrade_db');
$deploy->log('Updating wordpress database... ');
};