From 5d96a3bf2479fa058a76c53917c524e457478687 Mon Sep 17 00:00:00 2001 From: B Tarun Kumar <152691126+TarunKamur@users.noreply.github.com> Date: Fri, 2 Feb 2024 11:50:02 -0500 Subject: [PATCH 1/7] Create cicd.yml --- .github/workflows/cicd.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/cicd.yml diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml new file mode 100644 index 00000000..47a37f98 --- /dev/null +++ b/.github/workflows/cicd.yml @@ -0,0 +1,36 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: npm ci + - run: npm test + + publish-gpr: + needs: build + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: https://npm.pkg.github.com/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} From 6bd12a2d0bc94b5493381c98c45e7d64c90798a2 Mon Sep 17 00:00:00 2001 From: B Tarun Kumar <152691126+TarunKamur@users.noreply.github.com> Date: Fri, 2 Feb 2024 12:28:35 -0500 Subject: [PATCH 2/7] Create main.yml --- .github/workflows/main.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..e36ccb88 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,36 @@ +name: CI/CD for React App + +on: + push: + branches: + - main # Change this to your main branch + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: 14 + + - name: Install Dependencies + run: npm install + + - name: Build React App + run: npm run build + + deploy: + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@releases/v3 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: build # The folder where the build artifacts are located From f9d7785b4cc5e16aaa54db6bb6f898d9a919b720 Mon Sep 17 00:00:00 2001 From: B Tarun Kumar <152691126+TarunKamur@users.noreply.github.com> Date: Sat, 3 Feb 2024 04:36:27 -0500 Subject: [PATCH 3/7] Delete .github/workflows directory --- .github/workflows/cicd.yml | 36 ------------------------------------ .github/workflows/main.yml | 36 ------------------------------------ 2 files changed, 72 deletions(-) delete mode 100644 .github/workflows/cicd.yml delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml deleted file mode 100644 index 47a37f98..00000000 --- a/.github/workflows/cicd.yml +++ /dev/null @@ -1,36 +0,0 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages - -name: Node.js Package - -on: - release: - types: [created] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16 - - run: npm ci - - run: npm test - - publish-gpr: - needs: build - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16 - registry-url: https://npm.pkg.github.com/ - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index e36ccb88..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: CI/CD for React App - -on: - push: - branches: - - main # Change this to your main branch - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: 14 - - - name: Install Dependencies - run: npm install - - - name: Build React App - run: npm run build - - deploy: - runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - uses: JamesIves/github-pages-deploy-action@releases/v3 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages - FOLDER: build # The folder where the build artifacts are located From 064c255638dac0785cfc6d6f4ba698c23a085d17 Mon Sep 17 00:00:00 2001 From: B Tarun Kumar <152691126+TarunKamur@users.noreply.github.com> Date: Sat, 3 Feb 2024 04:37:59 -0500 Subject: [PATCH 4/7] main.yml --- .github/workflows/main.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..0414e489 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,36 @@ +name: CI/CD for React App + +on: + push: + branches: + - main # Change this to your main branch + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: 14 + + - name: Install Dependencies + run: npm install + + - name: Build React App + run: npm run build + + deploy: + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@releases/v3 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: public # The folder where the build artifacts are located From 2ecf6c295576156eb2694121182227aed9e6f6ad Mon Sep 17 00:00:00 2001 From: B Tarun Kumar <152691126+TarunKamur@users.noreply.github.com> Date: Sat, 3 Feb 2024 04:39:28 -0500 Subject: [PATCH 5/7] Delete .github/workflows directory --- .github/workflows/main.yml | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 0414e489..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: CI/CD for React App - -on: - push: - branches: - - main # Change this to your main branch - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: 14 - - - name: Install Dependencies - run: npm install - - - name: Build React App - run: npm run build - - deploy: - runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - uses: JamesIves/github-pages-deploy-action@releases/v3 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages - FOLDER: public # The folder where the build artifacts are located From 7ae78beb3337c419d2ab57f7a16f648aa02c31f8 Mon Sep 17 00:00:00 2001 From: B Tarun Kumar <152691126+TarunKamur@users.noreply.github.com> Date: Sat, 3 Feb 2024 04:40:16 -0500 Subject: [PATCH 6/7] main.yml --- .github/workflows/main.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..e7b64375 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,36 @@ +name: CI/CD for React App + +on: + push: + branches: + - main # Change this to your main branch + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: 14 + + - name: Install Dependencies + run: npm install + + - name: Build React App + run: npm run build + + deploy: + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@releases/v3 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: public # The folder where the build artifacts are located From d41f78673d1166e226b32672f36bca8a8366f045 Mon Sep 17 00:00:00 2001 From: B Tarun Kumar <152691126+TarunKamur@users.noreply.github.com> Date: Sat, 3 Feb 2024 04:42:24 -0500 Subject: [PATCH 7/7] Update index.html --- public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index a7806ddf..8f2dcd58 100644 --- a/public/index.html +++ b/public/index.html @@ -43,7 +43,7 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> - Weather App + Weather-Frocasting-App