Skip to content

Commit 4acf2b0

Browse files
authored
feat: show deploy version on select-all (#2)
## Summary - Inject git commit hash and build timestamp at build time via Vite's `define` option - Display deploy info in a hidden `<p>` element at the bottom of the download page - Text color matches background (`#fafafa`), only visible when user selects all text (Ctrl+A / Cmd+A) ## Test plan - [x] Build and deploy, then visit the page — deploy info should be invisible - [x] Press Ctrl+A / Cmd+A to select all text — deploy info (commit + timestamp) should appear - [x] Verify commit hash matches the deployed commit 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent a24f767 commit 4acf2b0

6 files changed

Lines changed: 461 additions & 210 deletions

File tree

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
pull_request:
66
branches: [main]
77

8+
permissions:
9+
contents: read
10+
pull-requests: write
11+
812
jobs:
913
test:
1014
runs-on: ubuntu-latest
@@ -19,3 +23,30 @@ jobs:
1923
- run: vp check
2024
- run: vp build
2125
- run: vp test
26+
27+
staging-deploy:
28+
needs: test
29+
if: github.event_name == 'pull_request'
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v6
33+
- uses: voidzero-dev/setup-vp@v1
34+
with:
35+
cache: true
36+
registry-url: https://npm.pkg.github.com
37+
env:
38+
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
39+
- run: vpx void deploy
40+
env:
41+
VOID_TOKEN: ${{ secrets.VOID_TOKEN }}
42+
VOID_PROJECT: vp-setup-staging
43+
- name: Comment on PR
44+
uses: actions/github-script@v7
45+
with:
46+
script: |
47+
github.rest.issues.createComment({
48+
owner: context.repo.owner,
49+
repo: context.repo.repo,
50+
issue_number: context.issue.number,
51+
body: '✅ Staging deployment successful!\n\nPreview: https://vp-setup-staging.void.app/'
52+
})

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"prepare": "vp config"
88
},
99
"devDependencies": {
10+
"@types/node": "^25.5.2",
1011
"vite": "catalog:",
1112
"vite-plus": "catalog:",
1213
"void": "npm:@void-sdk/void@0.2.6"

0 commit comments

Comments
 (0)