From 609c985fc96e86a3abe2d4391915437004d9ca73 Mon Sep 17 00:00:00 2001 From: Steven Tan Date: Thu, 27 Dec 2018 16:33:36 +0800 Subject: [PATCH 1/2] Changes to steps for publishing GitHub User Page Remove the the step for switching to gh-pages branch as it is no longer a viable option. --- docusaurus/docs/deployment.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docusaurus/docs/deployment.md b/docusaurus/docs/deployment.md index d25f18244fe..b8e49bac5e5 100644 --- a/docusaurus/docs/deployment.md +++ b/docusaurus/docs/deployment.md @@ -106,7 +106,8 @@ To override this, specify the `homepage` in your `package.json`, for example: This will let Create React App correctly infer the root path to use in the generated HTML file. **Note**: If you are using `react-router@^4`, you can root ``s using the `basename` prop on any ``.
-More information [here](https://reacttraining.com/react-router/web/api/BrowserRouter/basename-string).
+More information [here](https://reacttraining.com/react-router/web/api/BrowserRouter/basename-string).
+
For example: @@ -240,7 +241,8 @@ For more information see [Firebase Hosting](https://firebase.google.com/docs/hos ### Step 1: Add `homepage` to `package.json` -**The step below is important!**
+**The step below is important!**
+ **If you skip it, your app will not deploy correctly.** Open your `package.json` and add a `homepage` field for your project: @@ -291,11 +293,10 @@ Add the following scripts in your `package.json`: The `predeploy` script will run automatically before `deploy` is run. -If you are deploying to a GitHub user page instead of a project page you'll need to make two -additional modifications: +If you are deploying to a GitHub user page instead of a project page you'll need to make one +additional modification: -1. First, change your repository's source branch to be any branch other than **master**. -1. Additionally, tweak your `package.json` scripts to push deployments to **master**: +1. Tweak your `package.json` scripts to push deployments to **master**: ```diff "scripts": { @@ -312,7 +313,7 @@ Then run: npm run deploy ``` -### Step 4: Ensure your project’s settings use `gh-pages` +### Step 4: For a project's page, ensure your project’s settings use `gh-pages` Finally, make sure **GitHub Pages** option in your GitHub project settings is set to use the `gh-pages` branch: From 431236b8aa50f517959bb8c361361d986be11ab1 Mon Sep 17 00:00:00 2001 From: Steven Tan Date: Mon, 14 Jan 2019 19:50:44 +0800 Subject: [PATCH 2/2] Changed projects to project --- docusaurus/docs/deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/deployment.md b/docusaurus/docs/deployment.md index b8e49bac5e5..2b287488e7f 100644 --- a/docusaurus/docs/deployment.md +++ b/docusaurus/docs/deployment.md @@ -313,7 +313,7 @@ Then run: npm run deploy ``` -### Step 4: For a project's page, ensure your project’s settings use `gh-pages` +### Step 4: For a project page, ensure your project’s settings use `gh-pages` Finally, make sure **GitHub Pages** option in your GitHub project settings is set to use the `gh-pages` branch: