Skip to content

Commit a414106

Browse files
committed
2 parents 98e78ae + a1dbb75 commit a414106

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,23 @@ jobs:
2727
- name: Install dependencies
2828
run: pnpm install
2929

30+
- name: Generate build version info
31+
run: |
32+
# Extract full and short commit SHA
33+
FULL_SHA=$(git rev-parse HEAD)
34+
SHORT_SHA=$(git rev-parse --short HEAD)
35+
36+
# Extract build date in "DD Mon YYYY" format
37+
BUILD_DATE=$(date -u +'%d %b %Y')
38+
39+
# Create .env.production file with build info
40+
echo "VITE_BUILD_SHA=${FULL_SHA}" > .env.production
41+
echo "VITE_BUILD_DATE=${BUILD_DATE}" >> .env.production
42+
43+
# Log for debugging
44+
echo "Build SHA: ${SHORT_SHA} (${FULL_SHA})"
45+
echo "Build Date: ${BUILD_DATE}"
46+
3047
- name: Build
3148
run: pnpm run build
3249

0 commit comments

Comments
 (0)