From c3033b4cbde838cc74d82c5452e4c9b2c17b830d Mon Sep 17 00:00:00 2001 From: Ameer Hamza <73628472+ItzAmeerHamza@users.noreply.github.com> Date: Thu, 5 Dec 2024 01:40:36 +0500 Subject: [PATCH] readme tweak to push deployments to master Updated readme in order to add scripts to push deployments to master directly. --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0482861c..ed018efa 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,17 @@ At this point, the React app's `package.json` file includes a property named `ho "start": "react-scripts start", "build": "react-scripts build", ``` + > \* To deploy code from `master` change the following settings in your package.json + ```diff + "scripts": { + - "deploy": "gh-pages -d build", + + "deploy": "gh-pages -b master -d build", + ``` + > \* Check settings in Github (Repo -> Settings -> Pages) + - **Source** in **Build and deployment** should be ***Deploy from a Branch*** + - **Branch** should be selected to `master` + - **Folder** `/ (root)` + - After this follow the remaining instructions provided below **excluding point # 8** At this point, the React app's `package.json` file includes deployment scripts. @@ -204,7 +215,7 @@ At this point, the GitHub repository contains a branch named `gh-pages`, which c 1. In the sidebar, in the "Code and automation" section, click on "Pages" 1. Configure the "Build and deployment" settings like this: 1. **Source**: Deploy from a branch - 2. **Branch**: + 2. **Branch**: - Branch: `gh-pages` - Folder: `/ (root)` 1. Click on the "Save" button @@ -293,4 +304,4 @@ Note: I specified the avatars using HTML because, when I did so using Markdown, jackweyhrich -This list is maintained manually—for now—and includes (a) each person who submitted a pull request that was eventually merged into `master`, and (b) each person who contributed in a different way (e.g. providing constructive feedback) and who approved of me including them in this list. \ No newline at end of file +This list is maintained manually—for now—and includes (a) each person who submitted a pull request that was eventually merged into `master`, and (b) each person who contributed in a different way (e.g. providing constructive feedback) and who approved of me including them in this list.