From 742be649eb28f11f344c79469c2ba981d07f9c1c Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Tue, 20 May 2025 00:07:58 +0200 Subject: [PATCH] Add /build-info page displaying Add page displaying information about the deployment for diagnostic purposes. --- .forgejo/workflows/build.yaml | 10 ++++++- pages/build-info.vue | 54 +++++++++++++++++++++++++++++++++++ shared/utils/build-info.ts | 4 +++ 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 pages/build-info.vue create mode 100644 shared/utils/build-info.ts diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index 2483a16..d9ab8cc 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -22,8 +22,16 @@ jobs: echo "https://runner:${{ secrets.GITHUB_TOKEN }}@$(echo "${{ github.server_url }}" | cut -b 9-)" > ~/.git-credentials git clone --branch ${{ github.ref_name }} ${{ github.server_url }}/${{ github.repository }} ${{ github.workspace }} - - name: Build and push + name: Write build info shell: bash + run: | + cat > ${{ github.workspace }}/shared/utils/build-info.ts < +
+

+ Build Info +

+
+
Builder:
{{ builder }}
+
Git Ref:
{{ gitRef }}
+
Git Commit:
{{ gitCommit }}
+
App mode:
{{ appMode }}
+
Base URL:
{{ baseUrl }}
+
NODE_ENV:
{{ nodeEnv }}
+
Server Side:
{{ serverSide }}
+
Dev server:
{{ devServer }}
+
Prerender:
{{ prerender }}
+
+
+ + + + + diff --git a/shared/utils/build-info.ts b/shared/utils/build-info.ts new file mode 100644 index 0000000..489b007 --- /dev/null +++ b/shared/utils/build-info.ts @@ -0,0 +1,4 @@ +// Overwritten by build script +export const BUILDER = ""; +export const GIT_REF = ""; +export const GIT_SHA = "";