-
-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy gh-pages branch from travis #45
Conversation
As I said in Gitter, I've copy-pasted your instructions in |
I think with the latest commit it will be easier: no custom deploy, it uses In the future I wish we could get rid of the |
@mnapoli Looks better now, I felt so bad for not using |
I can help to try travis deployment. It's the main feature to make me switch from daux.io. |
|
||
if ($travisBranch != 'master') { | ||
$output->writeln('<notice>[NOT DEPLOYED] Deploying Couscous only for master branch</notice>'); | ||
exit(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the command return 0
instead (here and below in the class)? Anything not 0
is interpreted as an error, so I'm afraid it might fail Travis build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mmh weird, exit(1)
didn't fail the build (https://travis-ci.org/CouscousPHP/Couscous/jobs/43091310) I'm missing something here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mnapoli it is because this is being executed in the after_success
section (which is right).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK! But even then should we not return 0
deployed or not (except if an actual error occurs of course).
c25a0ec
to
9b222d3
Compare
All is almost fine https://github.com/wallabag/documentation Just one problem with this part of code $isPullRequest = (bool) getenv('TRAVIS_PULL_REQUEST');
if ($isPullRequest) {
$output->writeln('<notice>[NOT DEPLOYED] Not deploying Couscous for pull requests</notice>');
exit(1);
} TRAVIS_PULL_REQUEST is TRUE, even it's a commit, not a PR. |
I finally managed to build website thanks to Jenkins https://travis-ci.org/wallabag/documentation/builds/44868579 |
@CouscousPHP/collaborators This PR is ready for review at last... ;) Comments welcome and tell me if I need to squash... |
@wysow awesome! But just thought of something: if we generate the website for master, then it will re-generate and upload Maybe we could imagine another workflow to generate/upload |
Or we could add (yet another) option to |
For the record I've updated the documentation, feel free to review & improve it. |
/** | ||
* @var Filesystem | ||
*/ | ||
private $filesystem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this property is not used, could be removed.
And I like it too. |
@nicosomb we discussed that topic a bit on gitter and the solution we imagined would be:
So we would remove these lines from Things that would be required though:
|
…s to be the fastest on Travis
…loyment from travis
@CouscousPHP/collaborators Feel free to review and merge if it's ok for you guys! ;) |
Let's ship it!
|
Deploy gh-pages branch from travis
WIP for #34
(this is #44 but merged into a local branch so that we can all push commits to it and we can test the results in this repository)
To safely deploy with Couscous from a Travis build we need to take this things into consideration:
docs/travis.md
Couscous specific problem: don't generate & upload(will be done in a new PR)couscous.phar
for pushes to master (else we might push an unstable phar)The process is detailed in docs/travis.md
Feel free to add commits and keep working on this together.