File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -25,16 +25,21 @@ jobs:
2525 - name : 🔍 Install dependencies
2626 run : npm install
2727
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+
2837 - name : 🧱 Build application
2938 run : npm run build
3039
3140 - name : 🔑 Copy .env file
3241 run : cp .env.production dist/.env
3342
34- - name : 📝 Update .env with Secrets
35- run : |
36- sed -i "s|VITE_MERCURE_TOKEN=.*|VITE_MERCURE_TOKEN=${{ secrets.MERCURE_TOKEN }}|" dist/.env
37-
3843 - name : 📤 Deploy to VPS
3944 uses : easingthemes/ssh-deploy@main
4045 with :
You can’t perform that action at this time.
0 commit comments