Skip to content

Commit 34a398e

Browse files
committed
Fix GitHub Actions workflow with manual trigger inputs and improve deployment
1 parent 7eadd94 commit 34a398e

2 files changed

Lines changed: 56 additions & 1 deletion

File tree

.github/workflows/deploy-apprunner.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
name: Deploy to AWS App Runner
22

33
on:
4-
workflow_dispatch: # Manual trigger
4+
workflow_dispatch: # Enable manual trigger
5+
inputs:
6+
environment:
7+
description: 'Deployment environment'
8+
required: false
9+
default: 'production'
10+
type: choice
11+
options:
12+
- production
13+
- staging
514
push:
615
branches: [ main ]
716
paths-ignore:
817
- 'README.md'
918
- 'docs/**'
19+
- '*.md'
1020

1121
env:
1222
AWS_REGION: ap-southeast-2

check-deployment.ps1

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Check GitHub Actions and AWS deployment status
2+
3+
Write-Host "🔍 Deployment Status Checker" -ForegroundColor Green
4+
Write-Host ""
5+
6+
# GitHub Actions URL
7+
$REPO_URL = "https://github.com/hk-dev13/project-permit-api"
8+
$ACTIONS_URL = "$REPO_URL/actions"
9+
10+
Write-Host "📋 Quick Links:" -ForegroundColor Yellow
11+
Write-Host "GitHub Actions: $ACTIONS_URL" -ForegroundColor Cyan
12+
Write-Host "AWS App Runner: https://ap-southeast-2.console.aws.amazon.com/apprunner/home" -ForegroundColor Cyan
13+
Write-Host "AWS ECR: https://ap-southeast-2.console.aws.amazon.com/ecr/repositories" -ForegroundColor Cyan
14+
Write-Host ""
15+
16+
# Check if AWS CLI is working (with new credentials)
17+
Write-Host "🔐 Testing AWS Access..." -ForegroundColor Yellow
18+
try {
19+
$AccountOutput = .\.venv\Scripts\python.exe -m awscli sts get-caller-identity 2>$null
20+
if ($LASTEXITCODE -eq 0) {
21+
$AccountInfo = $AccountOutput | ConvertFrom-Json
22+
Write-Host "✅ AWS Account: $($AccountInfo.Account)" -ForegroundColor Green
23+
Write-Host "✅ User: $($AccountInfo.Arn)" -ForegroundColor Green
24+
} else {
25+
Write-Host "⚠️ Local AWS credentials not configured (that's OK - using GitHub Actions)" -ForegroundColor Yellow
26+
}
27+
}
28+
catch {
29+
Write-Host "⚠️ Local AWS CLI test failed (that's OK - using GitHub Actions)" -ForegroundColor Yellow
30+
}
31+
32+
Write-Host ""
33+
Write-Host "🚀 Next Steps After GitHub Actions Completes:" -ForegroundColor Green
34+
Write-Host "1. Check Actions tab for ECR image URI" -ForegroundColor White
35+
Write-Host "2. Go to AWS App Runner Console" -ForegroundColor White
36+
Write-Host "3. Create Service → Container Registry" -ForegroundColor White
37+
Write-Host "4. Use ECR image URI from Actions output" -ForegroundColor White
38+
Write-Host "5. Set port: 8000" -ForegroundColor White
39+
Write-Host ""
40+
41+
# Open browser to actions page
42+
Write-Host "Opening GitHub Actions page..." -ForegroundColor Cyan
43+
Start-Process $ACTIONS_URL
44+
45+
Write-Host "✨ Ready for deployment!" -ForegroundColor Green

0 commit comments

Comments
 (0)