Skip to content
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

Allow PRs to be previewed in-browser without building them locally #20179

Merged
merged 1 commit into from
Jun 27, 2016

Conversation

cvrebert
Copy link
Collaborator

I still need to muck around with Savage a bit for this, but the idea is that for Sass or JS PRs, Travis can build the docs with the PR's changes and upload a copy to http://preview.twbsapps.com/c/${commit-sha}/ (and eventually we can post a GitHub comment that links to the URL). This is more convenient than having to pull down the PR locally, run Grunt, and then run Jekyll.
Also, we can eventually point Sauce/BrowserStack/etc. at these public URLs, instead of setting up a local tunnel to Travis, which can be flaky/slow sometimes.

CC: @twbs/team

@cvrebert
Copy link
Collaborator Author

@XhmikosR
Copy link
Member

Seems to work pretty good so 👍 from me.

@Johann-S
Copy link
Member

Maybe later, it would be interesting to allow to specifie a fork to check PRs.
For exemple :
http://preview.twbsapps.com/ Johann-S /c/37241ed75d5f2f177d8e46a6764fe00957a1afed

// Skip Sauce on Travis when [skip sauce] is in the commit message
if (isUndefOrNonZero(process.env.TWBS_DO_SAUCE)) {
testSubtasks.push('connect');
testSubtasks.push('saucelabs-qunit');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra semicolon semi

@cvrebert cvrebert merged commit e95e9fe into v4-dev Jun 27, 2016
@cvrebert cvrebert deleted the previewing branch June 27, 2016 21:19
@hnrch02
Copy link
Collaborator

hnrch02 commented Jun 27, 2016

Awesome work! Looks very handy.

@Johann-S
Copy link
Member

Any interests about my comment : #20179 (comment) ?

@cvrebert
Copy link
Collaborator Author

@Johann-S I don't quite understand the suggestion. This already works for PRs.

@Johann-S
Copy link
Member

Sorry I thought your PR allows us to see the result of all PR not only PR for the documentation.

I would like to say how can I show the result of this PR #18847 with your tool ?

@cvrebert
Copy link
Collaborator Author

@Johann-S You would need to rebase it against the current v4-dev branch head. Then after the build finishes, it would show up at http://preview.twbsapps.com/c/<your-commit-sha-here>
I'm going to tweak @twbs-savage in few days so that it includes such links as part of the comments it posts.

@Johann-S
Copy link
Member

Ok ! Thank you very much 👍

@cvrebert
Copy link
Collaborator Author

Sorry I thought your PR allows us to see the result of all PR not only PR for the documentation.

It works for all PRs that touch the Sass, JS, or HTML, but not the build system (Gruntfile, Travis, etc.; for security reasons). Not just docs PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants