Updated Readme on how to use continuous deployment

- Please check if the formatting is acceptable 
- Please check if the removal of npm deploy is acceptable. (It's better to remove technical stuff in a package like this to make it more user friendly)

Ideally what the readme should do is say, Fork the repo. And make a release with your updated config.js and done.
This commit is contained in:
Tanimul Haque Khan 2021-09-08 12:18:40 +06:00 committed by GitHub
parent b3c06be528
commit 6041dc51aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -382,6 +382,27 @@ The posts are fetched by [Article-api](https://github.com/arifszn/article-api).
Once you are done with your setup and have completed all steps above, you need to put your website online! The fastest approach is to use [GitHub Pages](https://pages.github.com) which is completely free.
**1. Github Pages:**
(BASIC)
- Open <code>package.json</code>, and change <code>homepage</code>'s value to <code>https://username.github.io/repoName</code>.
```js
// package.json
{
// ...
"homepage": "https://username.github.io/repoName",
}
```
- Now commit to your main branch
- The CI/CD pipeline will publish your page at the gh-pages branch.
- Go to Settings -> Pages -> Source and change the branch to gh-pages
- You can see the link where it is published.
- Any time you commit a change to main branch the website will automatically update.
- If you see only <code>README</code> at <code>username.github.io/repoName</code>, be sure to change your GitHub Page's source to <code>gh-pages</code> branch. See [how to](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site).
(ADVANCED)
- You can take this a step further by creating a repository in your name.
- Rename your forked repository to <code>username.github.io</code> in github, where <code>username</code> is your GitHub username (or organization name).
- Open <code>package.json</code>, and change <code>homepage</code>'s value to <code>https://username.github.io</code>.
@ -392,11 +413,8 @@ Once you are done with your setup and have completed all steps above, you need t
"homepage": "https://username.github.io",
}
```
- Run <code>npm run deploy</code>.
- If you see only <code>README</code> at <code>username.github.io</code>, be sure to change your GitHub Page's source to <code>gh-pages</code> branch. See [how to](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site).
Your personal portfolio will be live at <code>username.github.io</code>. For more info, visit [here](https://create-react-app.dev/docs/deployment/#github-pages).
- Your personal portfolio will be live at <code>username.github.io</code>. For more info, visit [here](https://create-react-app.dev/docs/deployment/#github-pages).
<br/>