From e4d214ed0ee0c0c2faa0e702fbab628fc9cfaa99 Mon Sep 17 00:00:00 2001 From: cyanChill <83375816+cyanChill@users.noreply.github.com> Date: Wed, 24 Jun 2026 21:59:24 -0400 Subject: [PATCH 01/12] fix: Include `GH_TOKEN` in workflow --- .github/workflows/check-versions.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/check-versions.yml b/.github/workflows/check-versions.yml index 6ab7a19..ed074a7 100644 --- a/.github/workflows/check-versions.yml +++ b/.github/workflows/check-versions.yml @@ -8,6 +8,8 @@ jobs: checkAppVersions: name: Check for current app versions and re-build site if they changed runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} permissions: contents: write steps: From 0ac81bad600664dd38e4ae53626f7ea7f619a066 Mon Sep 17 00:00:00 2001 From: cyanChill <83375816+cyanChill@users.noreply.github.com> Date: Wed, 24 Jun 2026 22:05:26 -0400 Subject: [PATCH 02/12] chore: Use `gh release` command instead of `gh api` --- .github/workflows/check-versions.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/check-versions.yml b/.github/workflows/check-versions.yml index ed074a7..2bc9204 100644 --- a/.github/workflows/check-versions.yml +++ b/.github/workflows/check-versions.yml @@ -18,14 +18,17 @@ jobs: - name: Query releases from MissingCore Music run: | - echo "MUSIC_LATEST_TAG=$(gh api \ - -H "Accept: application/vnd.github+json" \ - -H "X-GitHub-Api-Version: 2026-03-10" \ - /repos/MissingCore/Music/releases/latest - --jq '.tag_name')" >> $GITHUB_ENV - echo "MUSIC_RECENT_TAG=$(gh api \ - -H "Accept: application/vnd.github+json" \ - -H "X-GitHub-Api-Version: 2026-03-10" \ - /repos/MissingCore/Music/releases?per_page=1 - --jq '.[0].tag_name')" >> $GITHUB_ENV + echo "MUSIC_LATEST_TAG=$(gh release list \ + --exclude-drafts + --exclude-pre-releases + --json tagName + --limit 1 + --repo MissingCore/Music + --jq '.[0].tagName')" >> $GITHUB_ENV + echo "MUSIC_RECENT_TAG=$(gh release list \ + --exclude-drafts + --json tagName + --limit 1 + --repo MissingCore/Music + --jq '.[0].tagName')" >> $GITHUB_ENV echo "Latest Tag: $MUSIC_LATEST_TAG, Most Recent Tag: $MUSIC_LATEST_TAG" From 3ef5ca3f2b7d7bb4e30b572f668458cdbcd3f8e1 Mon Sep 17 00:00:00 2001 From: cyanChill <83375816+cyanChill@users.noreply.github.com> Date: Wed, 24 Jun 2026 22:06:46 -0400 Subject: [PATCH 03/12] fix: Command not multi-line --- .github/workflows/check-versions.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/check-versions.yml b/.github/workflows/check-versions.yml index 2bc9204..5ae1899 100644 --- a/.github/workflows/check-versions.yml +++ b/.github/workflows/check-versions.yml @@ -19,16 +19,16 @@ jobs: - name: Query releases from MissingCore Music run: | echo "MUSIC_LATEST_TAG=$(gh release list \ - --exclude-drafts - --exclude-pre-releases - --json tagName - --limit 1 - --repo MissingCore/Music + --exclude-drafts \ + --exclude-pre-releases \ + --json tagName \ + --limit 1 \ + --repo MissingCore/Music \ --jq '.[0].tagName')" >> $GITHUB_ENV echo "MUSIC_RECENT_TAG=$(gh release list \ - --exclude-drafts - --json tagName - --limit 1 - --repo MissingCore/Music + --exclude-drafts \ + --json tagName \ + --limit 1 \ + --repo MissingCore/Music \ --jq '.[0].tagName')" >> $GITHUB_ENV echo "Latest Tag: $MUSIC_LATEST_TAG, Most Recent Tag: $MUSIC_LATEST_TAG" From adeda5512c8477e3e894f158651636d63cf97e3f Mon Sep 17 00:00:00 2001 From: cyanChill <83375816+cyanChill@users.noreply.github.com> Date: Wed, 24 Jun 2026 22:16:33 -0400 Subject: [PATCH 04/12] chore: See if we can log the github output values --- .github/workflows/check-versions.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check-versions.yml b/.github/workflows/check-versions.yml index 5ae1899..5963311 100644 --- a/.github/workflows/check-versions.yml +++ b/.github/workflows/check-versions.yml @@ -17,18 +17,19 @@ jobs: uses: actions/checkout@v6 - name: Query releases from MissingCore Music + id: music_versions run: | echo "MUSIC_LATEST_TAG=$(gh release list \ + --repo MissingCore/Music \ --exclude-drafts \ --exclude-pre-releases \ - --json tagName \ --limit 1 \ - --repo MissingCore/Music \ - --jq '.[0].tagName')" >> $GITHUB_ENV + --json tagName \ + --jq '.[0].tagName')" >> $GITHUB_OUTPUT echo "MUSIC_RECENT_TAG=$(gh release list \ + --repo MissingCore/Music \ --exclude-drafts \ - --json tagName \ --limit 1 \ - --repo MissingCore/Music \ - --jq '.[0].tagName')" >> $GITHUB_ENV - echo "Latest Tag: $MUSIC_LATEST_TAG, Most Recent Tag: $MUSIC_LATEST_TAG" + --json tagName \ + --jq '.[0].tagName')" >> $GITHUB_OUTPUT + echo "Latest Tag: ${{ steps.music_versions.outputs.MUSIC_LATEST_TAG }}, Most Recent Tag: ${{ steps.music_versions.outputs.MUSIC_RECENT_TAG }}" From a0f7ba45067b332f7dbe5a7d9ccd35e7ba87ca1a Mon Sep 17 00:00:00 2001 From: cyanChill <83375816+cyanChill@users.noreply.github.com> Date: Wed, 24 Jun 2026 22:19:18 -0400 Subject: [PATCH 05/12] chore: Do the echoing later --- .github/workflows/check-versions.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check-versions.yml b/.github/workflows/check-versions.yml index 5963311..ccbf3a1 100644 --- a/.github/workflows/check-versions.yml +++ b/.github/workflows/check-versions.yml @@ -19,17 +19,22 @@ jobs: - name: Query releases from MissingCore Music id: music_versions run: | - echo "MUSIC_LATEST_TAG=$(gh release list \ + MUSIC_LATEST_TAG=$(gh release list \ --repo MissingCore/Music \ --exclude-drafts \ --exclude-pre-releases \ --limit 1 \ --json tagName \ - --jq '.[0].tagName')" >> $GITHUB_OUTPUT - echo "MUSIC_RECENT_TAG=$(gh release list \ + --jq '.[0].tagName // empty') + + MUSIC_RECENT_TAG=$(gh release list \ --repo MissingCore/Music \ --exclude-drafts \ --limit 1 \ --json tagName \ - --jq '.[0].tagName')" >> $GITHUB_OUTPUT - echo "Latest Tag: ${{ steps.music_versions.outputs.MUSIC_LATEST_TAG }}, Most Recent Tag: ${{ steps.music_versions.outputs.MUSIC_RECENT_TAG }}" + --jq '.[0].tagName // empty') + + echo "MUSIC_LATEST_TAG=$MUSIC_LATEST_TAG" >> "$GITHUB_OUTPUT" + echo "MUSIC_RECENT_TAG=$MUSIC_RECENT_TAG" >> "$GITHUB_OUTPUT" + + echo "Latest Tag: ${MUSIC_LATEST_TAG:-none}, Most Recent Tag: ${MUSIC_RECENT_TAG:-none}" From 7f98db7a3df100fccbf10aa007c684bd2159ac83 Mon Sep 17 00:00:00 2001 From: cyanChill <83375816+cyanChill@users.noreply.github.com> Date: Wed, 24 Jun 2026 22:25:41 -0400 Subject: [PATCH 06/12] chore: Update `.env.local` file if we have new versions - This should trigger a new build on Vercel. --- .github/workflows/check-versions.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/check-versions.yml b/.github/workflows/check-versions.yml index ccbf3a1..3bf3a0a 100644 --- a/.github/workflows/check-versions.yml +++ b/.github/workflows/check-versions.yml @@ -38,3 +38,20 @@ jobs: echo "MUSIC_RECENT_TAG=$MUSIC_RECENT_TAG" >> "$GITHUB_OUTPUT" echo "Latest Tag: ${MUSIC_LATEST_TAG:-none}, Most Recent Tag: ${MUSIC_RECENT_TAG:-none}" + + - name: Write versions to `.env.local` file and commit + run: | + echo "PUBLIC_MUSIC_LATEST_TAG=${{ steps.music_versions.outputs.MUSIC_LATEST_TAG }}" > .env.local + echo "PUBLIC_MUSIC_RECENT_TAG=${{ steps.music_versions.outputs.MUSIC_RECENT_TAG }}" >> .env.local + + git config user.name github-actions + git config user.email github-actions@github.com + + # Commit changes to `.env.local` + git add .env.local + + # Capture current time and format it (YYYY-MM-DD HH:MM:SS) + CURRENT_TIME=$(date +"%Y-%m-%d %H:%M:%S") + + git commit -m "[ci] Automatic Version Check $CURRENT_TIME" + git push From d3deb0aabc24909cc1e0cf86a3bd4598a12a392b Mon Sep 17 00:00:00 2001 From: cyanChill <83375816+cyanChill@users.noreply.github.com> Date: Wed, 24 Jun 2026 22:29:14 -0400 Subject: [PATCH 07/12] fix: Do not fail on error --- .github/workflows/check-versions.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check-versions.yml b/.github/workflows/check-versions.yml index 3bf3a0a..159b105 100644 --- a/.github/workflows/check-versions.yml +++ b/.github/workflows/check-versions.yml @@ -55,3 +55,4 @@ jobs: git commit -m "[ci] Automatic Version Check $CURRENT_TIME" git push + continue-on-error: true From b03a31d26568fdfd64e050aa1088a0dae3387ef9 Mon Sep 17 00:00:00 2001 From: cyanChill <83375816+cyanChill@users.noreply.github.com> Date: Wed, 24 Jun 2026 22:31:52 -0400 Subject: [PATCH 08/12] fix: Only enable auto deployment on `main` branch --- vercel.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 vercel.json diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..2712c7a --- /dev/null +++ b/vercel.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://openapi.vercel.sh/vercel.json", + "git": { + "deploymentEnabled": { + "*": false, + "main": true + } + } +} From 7ba541eac7871d9258367cb0fb77645463f45a3e Mon Sep 17 00:00:00 2001 From: cyanChill <83375816+cyanChill@users.noreply.github.com> Date: Wed, 24 Jun 2026 22:35:34 -0400 Subject: [PATCH 09/12] chore: Change `.env.local` to test workflow --- .env.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.local b/.env.local index c52b6fc..6a59650 100644 --- a/.env.local +++ b/.env.local @@ -1,2 +1,2 @@ PUBLIC_MUSIC_LATEST_TAG=v3.2.0 -PUBLIC_MUSIC_RECENT_TAG=v3.3.0-rc.1 +PUBLIC_MUSIC_RECENT_TAG=v3.2.0 From e3c3ae92a2f27c5fcfe2c864d6c2d9c5e2aa02f3 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 25 Jun 2026 02:36:08 +0000 Subject: [PATCH 10/12] [ci] Automatic Version Check 2026-06-25 02:36:08 --- .env.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.local b/.env.local index 6a59650..c52b6fc 100644 --- a/.env.local +++ b/.env.local @@ -1,2 +1,2 @@ PUBLIC_MUSIC_LATEST_TAG=v3.2.0 -PUBLIC_MUSIC_RECENT_TAG=v3.2.0 +PUBLIC_MUSIC_RECENT_TAG=v3.3.0-rc.1 From b0cc159c2726858024b1ba9e0345feb0b34ac3de Mon Sep 17 00:00:00 2001 From: cyanChill <83375816+cyanChill@users.noreply.github.com> Date: Wed, 24 Jun 2026 22:46:29 -0400 Subject: [PATCH 11/12] ci: Deploy via Vercel Deploy Hook - Disabled auto deploy by setting `Ignored Build Step` to `Don't build anything`. - I vaguely remembered doing this in the past: - https://github.com/cyanChill/GitInspire/blob/main/.github/workflows/test_deploy_frontend.yml#L46-L57 --- .github/workflows/deploy-vercel.yml | 18 ++++++++++++++++++ vercel.json | 9 --------- 2 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/deploy-vercel.yml delete mode 100644 vercel.json diff --git a/.github/workflows/deploy-vercel.yml b/.github/workflows/deploy-vercel.yml new file mode 100644 index 0000000..7894704 --- /dev/null +++ b/.github/workflows/deploy-vercel.yml @@ -0,0 +1,18 @@ +name: Deploy to Vercel +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + deploy: + name: Deploy to Vercel using Deploy Hook + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Run Deploy Hook + run: | + curl ${{ secrets.VERCEL_DEPLOY_HOOK }} diff --git a/vercel.json b/vercel.json deleted file mode 100644 index 2712c7a..0000000 --- a/vercel.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://openapi.vercel.sh/vercel.json", - "git": { - "deploymentEnabled": { - "*": false, - "main": true - } - } -} From 431dc3fc3cf73fcee59289c55a8f78c5cd95a98c Mon Sep 17 00:00:00 2001 From: cyanChill <83375816+cyanChill@users.noreply.github.com> Date: Wed, 24 Jun 2026 23:00:03 -0400 Subject: [PATCH 12/12] chore: Suggestions by CodeRabbit --- .github/workflows/check-versions.yml | 18 +++++++++++++----- .github/workflows/deploy-vercel.yml | 7 +++---- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/check-versions.yml b/.github/workflows/check-versions.yml index 159b105..dab64d3 100644 --- a/.github/workflows/check-versions.yml +++ b/.github/workflows/check-versions.yml @@ -41,18 +41,26 @@ jobs: - name: Write versions to `.env.local` file and commit run: | + if [ -z "${{ steps.music_versions.outputs.MUSIC_LATEST_TAG }}" ] || \ + [ -z "${{ steps.music_versions.outputs.MUSIC_RECENT_TAG }}" ]; then + echo "One or both tags are empty; skipping write/commit." + exit 1 + fi echo "PUBLIC_MUSIC_LATEST_TAG=${{ steps.music_versions.outputs.MUSIC_LATEST_TAG }}" > .env.local echo "PUBLIC_MUSIC_RECENT_TAG=${{ steps.music_versions.outputs.MUSIC_RECENT_TAG }}" >> .env.local - + git config user.name github-actions git config user.email github-actions@github.com # Commit changes to `.env.local` git add .env.local - + # Capture current time and format it (YYYY-MM-DD HH:MM:SS) CURRENT_TIME=$(date +"%Y-%m-%d %H:%M:%S") - git commit -m "[ci] Automatic Version Check $CURRENT_TIME" - git push - continue-on-error: true + if git diff --cached --quiet; then + echo "No changes to .env.local; nothing to commit." + else + git commit -m "[ci] Automatic Version Check $CURRENT_TIME" + git push + fi diff --git a/.github/workflows/deploy-vercel.yml b/.github/workflows/deploy-vercel.yml index 7894704..92b1ccd 100644 --- a/.github/workflows/deploy-vercel.yml +++ b/.github/workflows/deploy-vercel.yml @@ -10,9 +10,8 @@ jobs: name: Deploy to Vercel using Deploy Hook runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v6 - - name: Run Deploy Hook + env: + VERCEL_DEPLOY_HOOK: ${{ secrets.VERCEL_DEPLOY_HOOK }} run: | - curl ${{ secrets.VERCEL_DEPLOY_HOOK }} + curl --fail --silent --show-error "$VERCEL_DEPLOY_HOOK"