Merge pull request #3 from Warhammer4000/patch-1

Updated Readme on how to use continuous deployment
This commit is contained in:
MD. Ariful Alam 2021-09-11 12:39:13 +06:00 committed by GitHub
commit d7696f070e
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>.
@ -393,10 +414,7 @@ Once you are done with your setup and have completed all steps above, you need t
}
```
- 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/>