From 6041dc51aaae732d8a8d7c83aedd7454ca40cb45 Mon Sep 17 00:00:00 2001 From: Tanimul Haque Khan Date: Wed, 8 Sep 2021 12:18:40 +0600 Subject: [PATCH] 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. --- README.md | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 300393d..30e767b 100644 --- a/README.md +++ b/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. **1. Github Pages:** + +(BASIC) + - Open package.json, and change homepage's value to https://username.github.io/repoName. + + ```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 README at username.github.io/repoName, be sure to change your GitHub Page's source to gh-pages 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 username.github.io in github, where username is your GitHub username (or organization name). - Open package.json, and change homepage's value to https://username.github.io. @@ -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 npm run deploy. - - If you see only README at username.github.io, be sure to change your GitHub Page's source to gh-pages 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 username.github.io. For more info, visit [here](https://create-react-app.dev/docs/deployment/#github-pages). + + - Your personal portfolio will be live at username.github.io. For more info, visit [here](https://create-react-app.dev/docs/deployment/#github-pages).