From a2e0f186d17896bdd6aaba2ff4f39155a949d754 Mon Sep 17 00:00:00 2001 From: CAtlas0784 Date: Sun, 18 Oct 2026 22:40:11 +0700 Subject: [PATCH] fix: stamp Pages build with deployed branch --- .github/workflows/deploy.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e7ab264..b3493f6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -25,6 +25,11 @@ jobs: uses: actions/checkout@v4 - name: Setup Pages uses: actions/configure-pages@v4 + - name: Generate deployment branch metadata + env: + DEPLOY_BRANCH: ${{ github.ref_name }} + run: | + node -e 'const fs = require("node:fs"); const data = { branch: process.env.DEPLOY_BRANCH, version: "1.0.0", updatedAt: new Date().toISOString() }; fs.writeFileSync("version.json", JSON.stringify(data, null, 2) + "\n");' - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: