Dhurgh commited on
Commit
842eb88
Β·
1 Parent(s): 70a3190

Add GitHub-based deployment script to bypass Railway CLI timeout

Browse files
Files changed (1) hide show
  1. deploy.ps1 +50 -0
deploy.ps1 ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # FireTech Messenger Auto-Deployment Script
2
+ # This script commits and pushes code to GitHub, triggering Railway auto-deploy
3
+ # Usage: .\deploy.ps1 "your commit message"
4
+
5
+ param(
6
+ [string]$Message = "Auto-deploy update"
7
+ )
8
+
9
+ Write-Host "πŸš€ FireTech Messenger Deployment Handler" -ForegroundColor Cyan
10
+ Write-Host "========================================" -ForegroundColor Cyan
11
+ Write-Host ""
12
+
13
+ # Verify git is available
14
+ $gitExists = git --version 2>$null
15
+ if (-not $gitExists) {
16
+ Write-Host "❌ Git not found. Please install Git for Windows." -ForegroundColor Red
17
+ exit 1
18
+ }
19
+
20
+ # Check git status
21
+ $status = git status --porcelain
22
+ if ([string]::IsNullOrWhiteSpace($status)) {
23
+ Write-Host "βœ… No changes to commit. Repository is clean." -ForegroundColor Green
24
+ exit 0
25
+ }
26
+
27
+ Write-Host "πŸ“ Staging changes..." -ForegroundColor Yellow
28
+ git add -A
29
+
30
+ Write-Host "πŸ’Ύ Committing with message: '$Message'" -ForegroundColor Yellow
31
+ git commit -m "$Message"
32
+
33
+ if ($LASTEXITCODE -ne 0) {
34
+ Write-Host "❌ Commit failed." -ForegroundColor Red
35
+ exit 1
36
+ }
37
+
38
+ Write-Host "πŸ“€ Pushing to GitHub (triggers Railway auto-deploy)..." -ForegroundColor Yellow
39
+ git push origin main
40
+
41
+ if ($LASTEXITCODE -eq 0) {
42
+ Write-Host "" -ForegroundColor Green
43
+ Write-Host "βœ… Push successful!" -ForegroundColor Green
44
+ Write-Host "πŸŽ‰ Railway is now auto-deploying from GitHub..." -ForegroundColor Green
45
+ Write-Host " Check dashboard: https://railway.app/" -ForegroundColor Cyan
46
+ Write-Host "" -ForegroundColor Green
47
+ } else {
48
+ Write-Host "❌ Push failed. Check your GitHub credentials." -ForegroundColor Red
49
+ exit 1
50
+ }