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

Added config to deploy on GitHub User Page #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ The remainder of this document contains a tutorial on creating a React app (usin
"homepage": "http://gitname.github.io/react-gh-pages"
```

* If you intend to deploy the app at your GitHub user page, you should set `"homepage"` to the root URL without the `{repo-name}`, like that:

```
//...
"homepage": "http://gitname.github.io"
```

* In the existing `scripts` property, add a `predeploy` property and a `deploy` property, each having the values shown below:

```js
Expand All @@ -94,6 +101,11 @@ The remainder of this document contains a tutorial on creating a React app (usin
}
```

* And if you are deploying this app at the user page, it is necessary to make some tweaks at the `"deploy"` string, in order to deploy it at the `main` branch, set the string to:
```
"deploy": "gh-pages -b main -d build"
```

* **Shortcut:** Instead of adding those properties using a text editor; if I have `sed` installed on my system, I can add the properties by issuing the following shell commands:

```sh
Expand Down