We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f983b8f commit 57b6d75Copy full SHA for 57b6d75
1 file changed
.github/workflows/deploy-vps.yml
@@ -25,16 +25,21 @@ jobs:
25
- name: 🔍 Install dependencies
26
run: npm install
27
28
+ - name: 📝 Inject secret in .env.production
29
+ run: |
30
+ echo "🔐 Injecting MERCURE_TOKEN into .env.production"
31
+ if [ -f .env.production ]; then
32
+ sed -i "s|^VITE_MERCURE_TOKEN=.*|VITE_MERCURE_TOKEN=${{ secrets.MERCURE_TOKEN }}|" .env.production
33
+ else
34
+ echo "❌ .env.production not found" && exit 1
35
+ fi
36
+
37
- name: 🧱 Build application
38
run: npm run build
39
40
- name: 🔑 Copy .env file
41
run: cp .env.production dist/.env
42
- - name: 📝 Update .env with Secrets
- run: |
- sed -i "s|VITE_MERCURE_TOKEN=.*|VITE_MERCURE_TOKEN=${{ secrets.MERCURE_TOKEN }}|" dist/.env
-
43
- name: 📤 Deploy to VPS
44
uses: easingthemes/ssh-deploy@main
45
with:
0 commit comments