Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI now builds docs website and deploys it to /%version% path
Summary: Copy of #5760 reverted merge. We need to preserve history of docs changes on the webserver. The goal is to allow users to browse outdated versions of docs. To make things simple all websites will be released to https://facebook.github.io/react-native/releases/version/XX folder when there is a branch cut. I switched from Travis CI to Cirle CI because it works faster and I am more familiar with it. How it works: 1. If code is pushed to `master` branch then CI will build a fresh version of docs and put it in https://github.com/facebook/react-native/tree/gh-pages/releases/next folder. Github will serve this website from https://facebook.github.io/react-native/releases/version/next URL. All relative URLs will work within that website 2. If code is pushed to `0.20-stable` branch then CI will build a fresh version of docs and put it in https://github.com/facebook/react-native/tree/gh-pages/releases/0.20 folder. Github will serve this website from https://facebook.github.io/react-native/releases/v Closes #5873 Reviewed By: svcscm Differential Revision: D2926901 Pulled By: androidtrunkagent fb-gh-sync-id: 16aea430bac815933d9c603f03921cc6353906f1 shipit-source-id: 16aea430bac815933d9c603f03921cc6353906f1
- Loading branch information
Showing
44 changed files
with
234 additions
and
186 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,12 +26,15 @@ dependencies: | |
- npm install -g npm@3.2 | ||
- source scripts/circle-ci-android-setup.sh && getAndroidSDK | ||
- ./gradlew :ReactAndroid:downloadBoost :ReactAndroid:downloadDoubleConversion :ReactAndroid:downloadFolly :ReactAndroid:downloadGlog | ||
- cd website && npm install | ||
cache_directories: | ||
- "ReactAndroid/build/downloads" | ||
- "buck" | ||
- "buck-out/bin" | ||
- "website/node_modules" | ||
override: | ||
- npm install | ||
|
||
test: | ||
pre: | ||
# starting emulator in advance because it takes very long to boot | ||
|
@@ -41,6 +44,7 @@ test: | |
- ./gradlew :ReactAndroid:assembleDebug -PdisablePreDex -Pjobs=1: | ||
timeout: 360 | ||
- source scripts/circle-ci-android-setup.sh && waitForAVD | ||
|
||
override: | ||
# buck tests | ||
- buck/bin/buck test ReactAndroid/src/test/... --config build.threads=1 | ||
|
@@ -57,9 +61,21 @@ test: | |
# run tests on the emulator | ||
- ./gradlew :ReactAndroid:connectedAndroidTest -PdisablePreDex --stacktrace --info: | ||
timeout: 360 | ||
|
||
# testing docs generation is not broken | ||
- cd website && node ./server/generate.js | ||
post: | ||
# copy test report for Circle CI to display | ||
- mkdir -p $CIRCLE_TEST_REPORTS/junit/ | ||
- find . -type f -regex ".*/build/test-results/debug/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \; | ||
- find . -type f -regex ".*/outputs/androidTest-results/connected/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \; | ||
|
||
deployment: | ||
website: | ||
branch: [/.*-stable/, /master/] | ||
commands: | ||
# generate docs website | ||
- git config --global user.email "bestnader@fb.com" | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
bestander
Author
Contributor
|
||
- git config --global user.name "Website Deployment Script" | ||
- echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" > ~/.netrc | ||
- cd website && GIT_USER=bestander npm run gh-pages |
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
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
Oops, something went wrong.
fyi @bestander :)