Merge pull request #3 from Warhammer4000/patch-1
Updated Readme on how to use continuous deployment
This commit is contained in:
commit
d7696f070e
28
README.md
28
README.md
@ -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.
|
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:**
|
**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).
|
- 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>.
|
- 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",
|
"homepage": "https://username.github.io",
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- Run <code>npm run deploy</code>.
|
- 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).
|
||||||
- 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).
|
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user