From 44614b539bb96b5569e9cd613a7ffc01de94fb23 Mon Sep 17 00:00:00 2001
From: Timna Brown <24630902+brown9804@users.noreply.github.com>
Date: Wed, 16 Jul 2025 10:02:30 -0600
Subject: [PATCH 01/10] change badge counter
---
terraform-infrastructure/README.md | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/terraform-infrastructure/README.md b/terraform-infrastructure/README.md
index 4738d92..21adda7 100644
--- a/terraform-infrastructure/README.md
+++ b/terraform-infrastructure/README.md
@@ -107,7 +107,9 @@ graph TD;
+
-
Total Visitors
-

+

+
Refresh Date: 2025-07-16
+
From 544d0df8e0b0affc438184353b0ff9fa5f3339d7 Mon Sep 17 00:00:00 2001
From: Timna Brown <24630902+brown9804@users.noreply.github.com>
Date: Wed, 16 Jul 2025 10:02:53 -0600
Subject: [PATCH 02/10] adjust badge counter
---
README.md | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index c139d17..6f0dae9 100644
--- a/README.md
+++ b/README.md
@@ -731,7 +731,9 @@ If you need further assistance with the code, please click [here to view all the
+
-
Total Visitors
-

+

+
Refresh Date: 2025-07-16
+
From 4218490b55bf667249edf8d50384b84e808f77f4 Mon Sep 17 00:00:00 2001
From: Timna Brown <24630902+brown9804@users.noreply.github.com>
Date: Wed, 16 Jul 2025 10:03:23 -0600
Subject: [PATCH 03/10] pull -> push
---
.github/workflows/update-md-date.yml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/.github/workflows/update-md-date.yml b/.github/workflows/update-md-date.yml
index 96dc9d7..ac7a96d 100644
--- a/.github/workflows/update-md-date.yml
+++ b/.github/workflows/update-md-date.yml
@@ -7,6 +7,7 @@ on:
permissions:
contents: write
+ pull-requests: write
jobs:
update-date:
@@ -35,7 +36,12 @@ jobs:
run: python .github/workflows/update_date.py
- name: Commit changes
+ env:
+ TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
+ git fetch origin ${{ github.event.pull_request.head.ref }}
+ git pull --rebase origin ${{ github.event.pull_request.head.ref }} || echo "No rebase needed"
git add -A
git commit -m "Update last modified date in Markdown files" || echo "No changes to commit"
+ git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }}
git push origin HEAD:${{ github.event.pull_request.head.ref }}
From 6dc902202bc8c816f87c7a4cc49ed43730dc592f Mon Sep 17 00:00:00 2001
From: Timna Brown <24630902+brown9804@users.noreply.github.com>
Date: Wed, 16 Jul 2025 10:04:04 -0600
Subject: [PATCH 04/10] clean ignore
---
.github/workflows/validate_and_fix_markdown.yml | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/validate_and_fix_markdown.yml b/.github/workflows/validate_and_fix_markdown.yml
index cd98f3c..4cef7ef 100644
--- a/.github/workflows/validate_and_fix_markdown.yml
+++ b/.github/workflows/validate_and_fix_markdown.yml
@@ -7,6 +7,7 @@ on:
permissions:
contents: write
+ pull-requests: write
jobs:
validate-and-fix-markdown:
@@ -27,18 +28,18 @@ jobs:
run: npm install -g markdownlint-cli
- name: Lint and Fix Markdown files
- run: markdownlint '**/*.md' --fix --config .github/.markdownlint.json --ignore GPT-RAG_SolutionAccelerator/
+ run: markdownlint '**/*.md' --fix --config .github/.markdownlint.json
- name: Configure Git
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- - name: Commit changes
+ - name: Commit and rebase changes
+ env:
+ PR_BRANCH: ${{ github.head_ref || github.ref_name }}
run: |
- git fetch origin
- git checkout -b ${{ github.event.pull_request.head.ref }} origin/${{ github.event.pull_request.head.ref }}
git add -A
git commit -m "Fix Markdown syntax issues" || echo "No changes to commit"
- git pull --rebase origin ${{ github.event.pull_request.head.ref }} || echo "No rebase needed"
- git push origin HEAD:${{ github.event.pull_request.head.ref }}
+ git pull --rebase origin "$PR_BRANCH" || echo "No rebase needed"
+ git push origin HEAD:"$PR_BRANCH"
From 67bebef5ce78169f746c5d3cd14eb9fef18c6ebb Mon Sep 17 00:00:00 2001
From: Timna Brown <24630902+brown9804@users.noreply.github.com>
Date: Wed, 16 Jul 2025 10:04:32 -0600
Subject: [PATCH 05/10] + counter pipeline
---
.github/workflows/use-visitor-counter.yml | 94 +++++++++++++++++++++++
1 file changed, 94 insertions(+)
create mode 100644 .github/workflows/use-visitor-counter.yml
diff --git a/.github/workflows/use-visitor-counter.yml b/.github/workflows/use-visitor-counter.yml
new file mode 100644
index 0000000..4aa2c96
--- /dev/null
+++ b/.github/workflows/use-visitor-counter.yml
@@ -0,0 +1,94 @@
+name: Use Visitor Counter Logic
+
+on:
+ pull_request:
+ branches:
+ - main
+ schedule:
+ - cron: '0 0 * * *' # Runs daily at midnight
+ workflow_dispatch: # Allows manual triggering
+
+permissions:
+ contents: write
+ pull-requests: write
+
+jobs:
+ update-visitor-count:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout current repository
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Shallow clone visitor counter logic
+ run: git clone --depth=1 https://github.com/brown9804/github-visitor-counter.git
+
+ - name: Set up Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+
+ - name: Install dependencies for github-visitor-counter
+ run: |
+ cd github-visitor-counter
+ npm ci
+
+ - name: Run visitor counter logic (updates markdown badges and metrics.json)
+ run: node github-visitor-counter/update_repo_views_counter.js
+ env:
+ TRAFFIC_TOKEN: ${{ secrets.TRAFFIC_TOKEN }}
+ REPO: ${{ github.repository }}
+
+ - name: Move generated metrics.json to root
+ run: mv github-visitor-counter/metrics.json .
+
+ - name: List files for debugging
+ run: |
+ ls -l
+ ls -l github-visitor-counter
+
+ - name: Clean up visitor counter logic
+ run: rm -rf github-visitor-counter
+
+ - name: Configure Git author
+ run: |
+ git config --global user.name "github-actions[bot]"
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
+
+ - name: Commit and push changes (PR)
+ if: github.event_name == 'pull_request'
+ env:
+ TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ git fetch origin
+ git checkout -b ${{ github.event.pull_request.head.ref }} origin/${{ github.event.pull_request.head.ref }}
+ git add "*.md" metrics.json
+ git commit -m "Update visitor count" || echo "No changes to commit"
+ git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }}
+ git pull --rebase origin ${{ github.event.pull_request.head.ref }} || echo "No rebase needed"
+ git push origin HEAD:${{ github.event.pull_request.head.ref }}
+
+ - name: Commit and push changes (non-PR)
+ if: github.event_name != 'pull_request'
+ env:
+ TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ git fetch origin
+ git checkout ${{ github.event.pull_request.head.ref }} || git checkout -b ${{ github.event.pull_request.head.ref }} origin/${{ github.event.pull_request.head.ref }}
+ git add "*.md" metrics.json
+ git commit -m "Update visitor count" || echo "No changes to commit"
+ git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }}
+ git pull --rebase origin ${{ github.event.pull_request.head.ref }} || echo "No rebase needed"
+ git push origin HEAD:${{ github.event.pull_request.head.ref }}
+
+ - name: Create Pull Request (non-PR)
+ if: github.event_name != 'pull_request'
+ uses: peter-evans/create-pull-request@v6
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ branch: update-visitor-count
+ title: "Update visitor count"
+ body: "Automated update of visitor count"
+ base: main
From 3bcca80fb541c28377b8b2de74bad99ca136d377 Mon Sep 17 00:00:00 2001
From: Timna Brown <24630902+brown9804@users.noreply.github.com>
Date: Wed, 16 Jul 2025 10:04:48 -0600
Subject: [PATCH 06/10] clean
From a129bfffecdb9d6562b5ebc6f982641b96411ffc Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Wed, 16 Jul 2025 16:05:10 +0000
Subject: [PATCH 07/10] Fix Markdown syntax issues
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 6f0dae9..8cca0aa 100644
--- a/README.md
+++ b/README.md
@@ -151,6 +151,7 @@ Last updated: 2025-05-20
> In the context of Azure Function Apps, a `hosting option refers to the plan you choose to run your function app`. This choice affects how your function app is scaled, the resources available to each function app instance, and the support for advanced functionalities like virtual network connectivity and container support.
> [!TIP]
+>
> - `Scale to Zero`: Indicates whether the service can automatically scale down to zero instances when idle.
> - **IDLE** stands for:
> - **I** – Inactive
@@ -164,7 +165,6 @@ Last updated: 2025-05-20
> - `Max Scale Out (Instances)`: Maximum number of instances the service can scale out to.
> - `Example AI Use Cases`: Real-world scenarios where each plan excels.
-
Flex Consumption
From d443afc249f8311e0ae55bf3613ebb89a1ae7758 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Wed, 16 Jul 2025 16:05:24 +0000
Subject: [PATCH 08/10] Update last modified date in Markdown files
---
README.md | 2 +-
terraform-infrastructure/README.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 8cca0aa..164cdbb 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ Costa Rica
[](https://github.com/)
[brown9804](https://github.com/brown9804)
-Last updated: 2025-05-20
+Last updated: 2025-07-16
----------
diff --git a/terraform-infrastructure/README.md b/terraform-infrastructure/README.md
index 21adda7..ab6fe8b 100644
--- a/terraform-infrastructure/README.md
+++ b/terraform-infrastructure/README.md
@@ -5,7 +5,7 @@ Costa Rica
[](https://github.com/)
[brown9804](https://github.com/brown9804)
-Last updated: 2025-05-20
+Last updated: 2025-07-16
----------
From f82b7e806efa723caecd756d0875172a806e887f Mon Sep 17 00:00:00 2001
From: Timna Brown <24630902+brown9804@users.noreply.github.com>
Date: Wed, 16 Jul 2025 10:06:15 -0600
Subject: [PATCH 09/10] testing e2e
From ae6fc324feb8221c3c64910c40a8730de408fb8a Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Wed, 16 Jul 2025 16:06:27 +0000
Subject: [PATCH 10/10] Update visitor count
---
README.md | 2 +-
metrics.json | 37 ++++++++++++++++++++++++++++++
terraform-infrastructure/README.md | 2 +-
3 files changed, 39 insertions(+), 2 deletions(-)
create mode 100644 metrics.json
diff --git a/README.md b/README.md
index 164cdbb..6d24b29 100644
--- a/README.md
+++ b/README.md
@@ -733,7 +733,7 @@ If you need further assistance with the code, please click [here to view all the
-

+
Refresh Date: 2025-07-16
diff --git a/metrics.json b/metrics.json
new file mode 100644
index 0000000..8665541
--- /dev/null
+++ b/metrics.json
@@ -0,0 +1,37 @@
+[
+ {
+ "date": "2025-07-07",
+ "count": 330,
+ "uniques": 20
+ },
+ {
+ "date": "2025-07-08",
+ "count": 159,
+ "uniques": 6
+ },
+ {
+ "date": "2025-07-10",
+ "count": 482,
+ "uniques": 1
+ },
+ {
+ "date": "2025-07-11",
+ "count": 170,
+ "uniques": 4
+ },
+ {
+ "date": "2025-07-12",
+ "count": 7,
+ "uniques": 1
+ },
+ {
+ "date": "2025-07-14",
+ "count": 130,
+ "uniques": 2
+ },
+ {
+ "date": "2025-07-15",
+ "count": 2,
+ "uniques": 1
+ }
+]
\ No newline at end of file
diff --git a/terraform-infrastructure/README.md b/terraform-infrastructure/README.md
index ab6fe8b..4c6b7e9 100644
--- a/terraform-infrastructure/README.md
+++ b/terraform-infrastructure/README.md
@@ -109,7 +109,7 @@ graph TD;
-

+
Refresh Date: 2025-07-16