-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy-with-url-update.ps1
39 lines (32 loc) · 1.82 KB
/
deploy-with-url-update.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# PowerShell script to deploy site with updated domain URLs
Write-Host "=== Deploying Personal Finance Dashboard with updated domain URLs ===" -ForegroundColor Green
Write-Host ""
# 1. Build the application
Write-Host "[1/4] Building the application..." -ForegroundColor Green
npm run build
if ($LASTEXITCODE -ne 0) {
Write-Host "Build failed. Please check for errors and try again." -ForegroundColor Red
exit 1
}
# 2. Commit the changes
Write-Host "[2/4] Committing changes..." -ForegroundColor Green
git add .
git commit -m "Update to use trypersonalfinance.com domain and fix Stripe CSP issues"
# 3. Push to GitHub
Write-Host "[3/4] Pushing to GitHub..." -ForegroundColor Green
git push origin master
# 4. Deploy to Netlify
Write-Host "[4/4] Deploying to Netlify..." -ForegroundColor Green
netlify deploy --prod --message "Update domain URLs and fix Stripe CSP"
Write-Host ""
Write-Host "=== Deployment completed ===" -ForegroundColor Green
Write-Host "Your site should now be using trypersonalfinance.com domain references." -ForegroundColor Yellow
Write-Host "Remember to update your DNS settings if not already configured." -ForegroundColor Yellow
Write-Host ""
Write-Host "Stripe Configuration Checklist:" -ForegroundColor Cyan
Write-Host "1. Set REACT_APP_STRIPE_PUBLISHABLE_KEY in your environment variables" -ForegroundColor White
Write-Host "2. Set STRIPE_SECRET_KEY in your server environment" -ForegroundColor White
Write-Host "3. Configure Stripe webhook at https://dashboard.stripe.com/webhooks" -ForegroundColor White
Write-Host " - Endpoint URL: https://api.trypersonalfinance.com/api/payments/webhook" -ForegroundColor White
Write-Host " - Events: invoice.payment_succeeded, invoice.payment_failed," -ForegroundColor White
Write-Host " customer.subscription.updated, customer.subscription.deleted" -ForegroundColor White