From 6f46b65da8d19a59c3c565d6e2918d64a0b62e3c Mon Sep 17 00:00:00 2001 From: hshah-mitre Date: Mon, 29 Dec 2025 11:34:54 -0500 Subject: [PATCH 01/10] Add MkDocs conversion job to deploy workflow Added a new job to convert Markdown files to HTML using MkDocs in the GitHub Actions workflow. --- .github/workflows/deploy.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 62ba382..62164c9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -109,6 +109,31 @@ jobs: -d "{\"team_reviewers\":[\"ai4sdlc-approval\"]}" \ https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER/requested_reviewers -v + +### + # Build stage - converting md file to html using MkDocs + convert_md_to_html_gh : + runs-on: ubuntu-latest + if: github.ref != 'refs/heads/main' # Run for non-main branches + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.9 + + - name: Install MkDocs and dependencies + run: | + pip install mkdocs mkdocs-material + + - name: Build project with MkDocs + run: | + echo "Building your project..." + mkdocs build + echo "pwd in build project with MKDocs" +### # Build stage - converting md file to html using MkDocs convert_md_to_html: From 533553dd38311809b41d17e402138c10ecebbfe4 Mon Sep 17 00:00:00 2001 From: hshah-mitre Date: Mon, 29 Dec 2025 11:41:32 -0500 Subject: [PATCH 02/10] Update deploy.yml --- .github/workflows/deploy.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 62164c9..4385a2d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -133,6 +133,14 @@ jobs: echo "Building your project..." mkdocs build echo "pwd in build project with MKDocs" + - name: Add .nojekyll + run: touch site/.nojekyll + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./site ### # Build stage - converting md file to html using MkDocs From 4442a1bec25b3f2bf4f251efb78c83058e811135 Mon Sep 17 00:00:00 2001 From: hshah-mitre Date: Mon, 29 Dec 2025 11:45:42 -0500 Subject: [PATCH 03/10] Change permissions from read to write for contents --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4385a2d..5d448f1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,7 +14,7 @@ on: permissions: - contents: read # This is required for actions/checkout + contents: write # This is required for actions/checkout pull-requests: write id-token: write # This is required requesting the JWT From 5bd6ca2587a981df2e25d8de9a89ed81f2977e8a Mon Sep 17 00:00:00 2001 From: hshah-mitre Date: Mon, 29 Dec 2025 15:10:27 -0500 Subject: [PATCH 04/10] Change trigger condition for auto_assign job Updated condition for auto_assign job to trigger on reviewed comments. --- .github/workflows/deploy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5d448f1..45339a7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,8 +21,11 @@ permissions: jobs: auto_assign: runs-on: ubuntu-latest - if: github.event_name == 'pull_request' && github.event.action != 'closed' + #if: github.event_name == 'pull_request' && github.event.action != 'closed' + if: github.event.review.state == 'commented' steps: + - name: Debug Event Payload + run: echo "${{ toJson(github.event) }}" - name: Checkout code uses: actions/checkout@v4 - name: configure aws credentials From 6962f42c95861af9c3c0737f5738960bc327364a Mon Sep 17 00:00:00 2001 From: hshah-mitre Date: Mon, 29 Dec 2025 15:21:43 -0500 Subject: [PATCH 05/10] Add debug step for reviewer login in deploy workflow --- .github/workflows/deploy.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 45339a7..44fb689 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,8 +24,11 @@ jobs: #if: github.event_name == 'pull_request' && github.event.action != 'closed' if: github.event.review.state == 'commented' steps: + - name: Debug Reviewer Login + run: echo "Reviewer Login:${{ github.event.review.user.login }}" - name: Debug Event Payload run: echo "${{ toJson(github.event) }}" + - name: Checkout code uses: actions/checkout@v4 - name: configure aws credentials From d81d85188ab87505ee5a9a778a4093f620d58fed Mon Sep 17 00:00:00 2001 From: hshah-mitre Date: Mon, 29 Dec 2025 15:26:05 -0500 Subject: [PATCH 06/10] Clean up deploy.yml by removing debug step Removed redundant Debug Event Payload step from workflow. --- .github/workflows/deploy.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 44fb689..2f594fa 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -25,10 +25,7 @@ jobs: if: github.event.review.state == 'commented' steps: - name: Debug Reviewer Login - run: echo "Reviewer Login:${{ github.event.review.user.login }}" - - name: Debug Event Payload - run: echo "${{ toJson(github.event) }}" - + run: echo "Reviewer Login:${{ github.event.review.user.login }}" - name: Checkout code uses: actions/checkout@v4 - name: configure aws credentials From 1b74ba4f8187d04bd99608ae849c7c59b3fd5928 Mon Sep 17 00:00:00 2001 From: hshah-mitre Date: Mon, 29 Dec 2025 16:10:23 -0500 Subject: [PATCH 07/10] Refactor auto-assign job and enhance comment message Updated conditions for auto-assign job and modified comment message to include review link. --- .github/workflows/deploy.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2f594fa..c281fe8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,11 +21,8 @@ permissions: jobs: auto_assign: runs-on: ubuntu-latest - #if: github.event_name == 'pull_request' && github.event.action != 'closed' - if: github.event.review.state == 'commented' - steps: - - name: Debug Reviewer Login - run: echo "Reviewer Login:${{ github.event.review.user.login }}" + if: github.event_name == 'pull_request' && github.event.action != 'closed' + steps: - name: Checkout code uses: actions/checkout@v4 - name: configure aws credentials @@ -95,7 +92,9 @@ jobs: PR_NUMBER=${{ github.event.pull_request.number }} REVIEWER=${{ github.event.review.user.login }} TEAM_HANDLE="@${{ github.repository_owner }}/ai4sdlc-approval" - COMMENT="$TEAM_HANDLE PR #$PR_NUMBER has a new review comment from @$REVIEWER and is ready for final review." + #COMMENT="$TEAM_HANDLE PR #$PR_NUMBER has a new review comment from @$REVIEWER and is ready for final review." + COMMENT="$TEAM_HANDLE PR #$PR_NUMBER has a new review comment from @$REVIEWER and is ready for final review. Please review the changes at the following site: http://${{ secrets.S3_BUCKET_NAME }}/mergeRequest/${PR_NUMBER}/index.html" + curl -X POST \ -H "Authorization: token $GITHUB_TOKEN" \ From ebac593a7e6fe1679582b7bdceb4db8b7dc2ab86 Mon Sep 17 00:00:00 2001 From: hshah-mitre Date: Mon, 29 Dec 2025 16:11:21 -0500 Subject: [PATCH 08/10] Fix indentation in deploy.yml steps section --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c281fe8..771d52c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -22,7 +22,7 @@ jobs: auto_assign: runs-on: ubuntu-latest if: github.event_name == 'pull_request' && github.event.action != 'closed' - steps: + steps: - name: Checkout code uses: actions/checkout@v4 - name: configure aws credentials From b784e83bf4172fd683b21efbfd4c26a521902b01 Mon Sep 17 00:00:00 2001 From: hshah-mitre Date: Mon, 29 Dec 2025 16:18:39 -0500 Subject: [PATCH 09/10] Refactor deploy workflow for MkDocs build and deploy --- .github/workflows/deploy.yml | 72 +++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 771d52c..2de7da2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -110,40 +110,6 @@ jobs: -H "Content-Type: application/json" \ -d "{\"team_reviewers\":[\"ai4sdlc-approval\"]}" \ https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER/requested_reviewers -v - - -### - # Build stage - converting md file to html using MkDocs - convert_md_to_html_gh : - runs-on: ubuntu-latest - if: github.ref != 'refs/heads/main' # Run for non-main branches - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.9 - - - name: Install MkDocs and dependencies - run: | - pip install mkdocs mkdocs-material - - - name: Build project with MkDocs - run: | - echo "Building your project..." - mkdocs build - echo "pwd in build project with MKDocs" - - name: Add .nojekyll - run: touch site/.nojekyll - - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./site -### # Build stage - converting md file to html using MkDocs convert_md_to_html: @@ -272,3 +238,41 @@ jobs: # Delete contents of the pr folder aws s3 rm s3://$S3_BUCKET_NAME/mergeRequest/$PR_NUMBER --recursive echo "PR folder deleted successfully !!!" + +### + # Build stage - converting md file to html using MkDocs + deploy_to_page : + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' && + github.event.action == 'closed' && + github.event.pull_request.merged == true && + github.event.pull_request.base.ref == 'main' + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.9 + + - name: Install MkDocs and dependencies + run: | + pip install mkdocs mkdocs-material + + - name: Build project with MkDocs + run: | + echo "Building your project..." + mkdocs build + echo "pwd in build project with MKDocs" + + - name: Add .nojekyll + run: touch site/.nojekyll + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./site +### + From d78b3909a67bc27bb8773ff2e2ac3ebaf15b1612 Mon Sep 17 00:00:00 2001 From: hshah-mitre Date: Mon, 29 Dec 2025 16:19:32 -0500 Subject: [PATCH 10/10] Update header from 'hello' to 'test to deploy in page' --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 320fad0..2b67d08 100644 --- a/docs/index.md +++ b/docs/index.md @@ -11,7 +11,7 @@ author: That Would Be Me # Change seven 7 # Change six 6 👋👋👋 ✅ adding... (change)... -# hello +# test to deploy in page ## Getting started # hello