Skip to content

Commit 311c3dc

Browse files
committed
chore: skip signing for PR build
1 parent bc34b38 commit 311c3dc

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Build
2727
run: make build
2828
env:
29-
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
29+
IS_PR: 'true'
3030

3131
- name: Generate assets
3232
run: make static-assets

vite.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@ export default ({ mode }) => {
1414
name: 'sign-bundle',
1515
writeBundle: async (options, bundle) => {
1616
const privateKeyB64 = env.PRIVATE_KEY
17+
const isPR = env.IS_PR === 'true' || process.env.IS_PR === 'true'
18+
1719
if (!privateKeyB64) {
18-
// cancel build process if there is no private key
20+
if (isPR) {
21+
console.warn('⚠️ PR build - skipping bundle signing')
22+
return
23+
}
1924
throw new Error('❌ PRIVATE_KEY environment variable is required for bundle signing')
2025
}
2126

0 commit comments

Comments
 (0)