-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck-deployment.ps1
More file actions
45 lines (38 loc) Β· 1.94 KB
/
check-deployment.ps1
File metadata and controls
45 lines (38 loc) Β· 1.94 KB
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
40
41
42
43
44
45
# Check GitHub Actions and AWS deployment status
Write-Host "π Deployment Status Checker" -ForegroundColor Green
Write-Host ""
# GitHub Actions URL
$REPO_URL = "https://github.com/hk-dev13/project-permit-api"
$ACTIONS_URL = "$REPO_URL/actions"
Write-Host "π Quick Links:" -ForegroundColor Yellow
Write-Host "GitHub Actions: $ACTIONS_URL" -ForegroundColor Cyan
Write-Host "AWS App Runner: https://ap-southeast-2.console.aws.amazon.com/apprunner/home" -ForegroundColor Cyan
Write-Host "AWS ECR: https://ap-southeast-2.console.aws.amazon.com/ecr/repositories" -ForegroundColor Cyan
Write-Host ""
# Check if AWS CLI is working (with new credentials)
Write-Host "π Testing AWS Access..." -ForegroundColor Yellow
try {
$AccountOutput = .\.venv\Scripts\python.exe -m awscli sts get-caller-identity 2>$null
if ($LASTEXITCODE -eq 0) {
$AccountInfo = $AccountOutput | ConvertFrom-Json
Write-Host "β
AWS Account: $($AccountInfo.Account)" -ForegroundColor Green
Write-Host "β
User: $($AccountInfo.Arn)" -ForegroundColor Green
} else {
Write-Host "β οΈ Local AWS credentials not configured (that's OK - using GitHub Actions)" -ForegroundColor Yellow
}
}
catch {
Write-Host "β οΈ Local AWS CLI test failed (that's OK - using GitHub Actions)" -ForegroundColor Yellow
}
Write-Host ""
Write-Host "π Next Steps After GitHub Actions Completes:" -ForegroundColor Green
Write-Host "1. Check Actions tab for ECR image URI" -ForegroundColor White
Write-Host "2. Go to AWS App Runner Console" -ForegroundColor White
Write-Host "3. Create Service β Container Registry" -ForegroundColor White
Write-Host "4. Use ECR image URI from Actions output" -ForegroundColor White
Write-Host "5. Set port: 8000" -ForegroundColor White
Write-Host ""
# Open browser to actions page
Write-Host "Opening GitHub Actions page..." -ForegroundColor Cyan
Start-Process $ACTIONS_URL
Write-Host "β¨ Ready for deployment!" -ForegroundColor Green