Created
September 29, 2016 16:42
-
-
Save MaartenGDev/8382a78e62a3a866b17cc48a00c7aa60 to your computer and use it in GitHub Desktop.
Deploy script for php
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
<?php | |
$directory = '/var/www/ci.maartendev.me/'; | |
if(isset($_GET['key']) && $_GET['key'] == 'c3fd698fb41a45secure6b66644d9445duji'){ | |
$gitCommands= [ | |
"git -C {$directory} pull", | |
"composer install -d {$directory}" | |
]; | |
foreach($gitCommands as $command){ | |
echo shell_exec($command) . "\n"; | |
} | |
}else{ | |
echo "error logged\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment