for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* This file is part of Symplify
* Copyright (c) 2016 Tomas Votruba (http://tomasvotruba.cz).
*/
namespace Symplify\PHP7_Sculpin\Github;
use Symfony\Component\Process\Process;
final class GihubPublishingProcess
{
public function setupTravisIdentityToGit()
if (getenv('TRAVIS')) {
(new Process('git config user.email "[email protected]"'))->run();
(new Process('git config user.name "Travis"'))->run();
}
public function addAndPushContentToGithubRepository(string $outputDirectory, string $githubRepository)
(new Process(sprintf('cd %s', $outputDirectory)))->run();
(new Process('git init && git add . && git commit -m "Regenerate output"'))->run();
(new Process(sprintf(
'git push --force --quiet "${%s}" master:gh-pages > /dev/null 2>&1',
$githubRepository
)))->run();