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 https://github.com/facebook/react-native/pull/5873

Reviewed By: svcscm

Differential Revision: D2926901

Pulled By: androidtrunkagent

fb-gh-sync-id: 16aea430bac815933d9c603f03921cc6353906f1
shipit-source-id: 16aea430bac815933d9c603f03921cc6353906f1

Conflicts:
	Libraries/Utilities/AlertIOS.js
	circle.yml
	website/layout/AutodocsLayout.js

Conflicts:
	Libraries/Components/ScrollView/ScrollView.js
	Libraries/PushNotificationIOS/PushNotificationIOS.js
	docs/GettingStarted.md
	website/publish.sh
This commit is contained in:
Konstantin Raev
2016-02-15 10:40:10 +00:00
parent 1668e6f5a3
commit 07375f26d5
41 changed files with 237 additions and 183 deletions
+9 -9
View File
@@ -16,7 +16,7 @@ We assume you have experience writing applications with React. If not, you can l
## Setup
React Native requires the basic setup explained at [React Native Getting Started](https://facebook.github.io/react-native/docs/getting-started.html#content).
React Native requires the basic setup explained at [React Native Getting Started](docs/getting-started.html#content).
After installing these dependencies there are two simple commands to get a React Native project all set up for development.
@@ -110,8 +110,8 @@ And lastly we need to apply this style to the Image component:
Press `⌘+R` / `Reload JS` and the image should now render.
<div class="tutorial-mock">
<img src="/react-native/img/TutorialMock.png" />
<img src="/react-native/img/TutorialMock2.png" />
<img src="img/TutorialMock.png" />
<img src="img/TutorialMock2.png" />
</div>
@@ -188,8 +188,8 @@ Styling the text is pretty straightforward:
Go ahead and press `⌘+R` / `Reload JS` and you'll see the updated view.
<div class="tutorial-mock">
<img src="/react-native/img/TutorialStyledMock.png" />
<img src="/react-native/img/TutorialStyledMock2.png" />
<img src="img/TutorialStyledMock.png" />
<img src="img/TutorialStyledMock2.png" />
</div>
### Fetching real data
@@ -280,8 +280,8 @@ Now modify the render function to render a loading view if we don't have any mov
Now press `⌘+R` / `Reload JS` and you should see "Loading movies..." until the response comes back, then it will render the first movie it fetched from Rotten Tomatoes.
<div class="tutorial-mock">
<img src="/react-native/img/TutorialSingleFetched.png" />
<img src="/react-native/img/TutorialSingleFetched2.png" />
<img src="img/TutorialSingleFetched.png" />
<img src="img/TutorialSingleFetched2.png" />
</div>
## ListView
@@ -363,8 +363,8 @@ Finally, we add styles for the `ListView` component to the `styles` JS object:
And here's the final result:
<div class="tutorial-mock">
<img src="/react-native/img/TutorialFinal.png" />
<img src="/react-native/img/TutorialFinal2.png" />
<img src="img/TutorialFinal.png" />
<img src="img/TutorialFinal2.png" />
</div>
There's still some work to be done to make it a fully functional app such as: adding navigation, search, infinite scroll loading, etc. Check the [Movies Example](https://github.com/facebook/react-native/tree/master/Examples/Movies) to see it all working.