From 4ab4759e6ec86ca800d793dc1740dbf1404ebc74 Mon Sep 17 00:00:00 2001 From: Jamshaid <167942076+GFS6YB@users.noreply.github.com> Date: Wed, 1 May 2024 06:25:17 +0500 Subject: [PATCH 1/6] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index da728a6..6a053b0 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "github-actions-crash-course", + "name": "github-actions-crash", "version": "0.1.0", "private": true, "homepage": "https://devopspro.github.io/github-actions-crash-course", From 1b4ab61e742a8011046a0ae8bb25a895bfae4ae3 Mon Sep 17 00:00:00 2001 From: Jamshaid <167942076+GFS6YB@users.noreply.github.com> Date: Wed, 1 May 2024 06:32:57 +0500 Subject: [PATCH 2/6] Update deploy.yaml --- .github/workflows/deploy.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 32454b6..8b841f3 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -19,15 +19,14 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 - name: Install dependencies run: npm install - name: Build Project run: npm run build - env: - REACT_APP_WELCOME_TEXT: ${{ vars.REACT_APP_WELCOME_TEXT }} + - name: Deploy to GitHub Pages uses: JamesIves/github-pages-deploy-action@4.1.0 From 96a3746c21d8b1f8bd832b048de56eacb3e5d250 Mon Sep 17 00:00:00 2001 From: Jamshaid <167942076+GFS6YB@users.noreply.github.com> Date: Wed, 1 May 2024 06:51:06 +0500 Subject: [PATCH 3/6] Update deploy.yaml --- .github/workflows/deploy.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 8b841f3..93a7437 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -14,10 +14,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 20 @@ -29,7 +29,7 @@ jobs: - name: Deploy to GitHub Pages - uses: JamesIves/github-pages-deploy-action@4.1.0 + uses: JamesIves/github-pages-deploy-action@v4 with: branch: gh-pages folder: build From 7a664ff3340fbf4006ae7a59984cab7ed11ac31f Mon Sep 17 00:00:00 2001 From: Jamshaid <167942076+GFS6YB@users.noreply.github.com> Date: Wed, 1 May 2024 07:05:23 +0500 Subject: [PATCH 4/6] Delete .github/workflows directory --- .github/workflows/deploy.yaml | 35 --------------------------------- .github/workflows/greetings.yml | 16 --------------- .github/workflows/youtube.yaml | 20 ------------------- 3 files changed, 71 deletions(-) delete mode 100644 .github/workflows/deploy.yaml delete mode 100644 .github/workflows/greetings.yml delete mode 100644 .github/workflows/youtube.yaml diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml deleted file mode 100644 index 93a7437..0000000 --- a/.github/workflows/deploy.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: CI/CD for React App - -on: - push: - branches: [main] - workflow_dispatch: - -permissions: - contents: write - -jobs: - build_and_deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Install dependencies - run: npm install - - - name: Build Project - run: npm run build - - - - name: Deploy to GitHub Pages - uses: JamesIves/github-pages-deploy-action@v4 - with: - branch: gh-pages - folder: build diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml deleted file mode 100644 index f8cd679..0000000 --- a/.github/workflows/greetings.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Greetings - -on: [pull_request_target, issues] - -jobs: - greeting: - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - steps: - - uses: actions/first-interaction@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-message: "Thanks you for creating a issue." - pr-message: "Thanks you for creating a pull request." diff --git a/.github/workflows/youtube.yaml b/.github/workflows/youtube.yaml deleted file mode 100644 index 884b9ff..0000000 --- a/.github/workflows/youtube.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: Latest YouTube Videos - -on: - schedule: - # Runs every day at 10:30 IST (5 UTC) - - cron: "0 5 * * *" - workflow_dispatch: - -permissions: - contents: write - -jobs: - update-readme-with-youtube: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: gautamkrishnar/blog-post-workflow@master - with: - comment_tag_name: "YOUTUBE" - feed_list: https://www.youtube.com/feeds/videos.xml?channel_id=UC8NDpwTbsFSeP7dkbl4hKeQ From 28d1c81ccfe9162281fdec2cc8c21700a4945cba Mon Sep 17 00:00:00 2001 From: Jamshaid <167942076+GFS6YB@users.noreply.github.com> Date: Wed, 1 May 2024 07:07:57 +0500 Subject: [PATCH 5/6] Create main.yml --- .github/workflows/main.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 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 0000000..93a7437 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,35 @@ +name: CI/CD for React App + +on: + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: write + +jobs: + build_and_deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install dependencies + run: npm install + + - name: Build Project + run: npm run build + + + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: gh-pages + folder: build From 776b76ce9b77659f268730cc86cf9baf9eaeec67 Mon Sep 17 00:00:00 2001 From: Jamshaid <167942076+GFS6YB@users.noreply.github.com> Date: Wed, 1 May 2024 10:46:41 +0500 Subject: [PATCH 6/6] Create greetings.yml --- .github/workflows/greetings.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/greetings.yml diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml new file mode 100644 index 0000000..bc64928 --- /dev/null +++ b/.github/workflows/greetings.yml @@ -0,0 +1,16 @@ +name: Greetings + +on: [pull_request_target, issues] + +jobs: + greeting: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: "Thanx for your first Issue' first issue" + pr-message: "Message that will be displayed on users' first pull request"