Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/deploy-backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy Backend

on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to deploy'
required: true
default: 'develop'
type: choice
options:
- develop

jobs:
deploy:
name: Deploy to AWS
runs-on: ubuntu-latest

steps:
- name: Deploy to AWS Server
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.AWS_HOST }}
username: ${{ secrets.AWS_USERNAME }}
key: ${{ secrets.AWS_SSH_KEY }}
port: ${{ secrets.AWS_PORT || 22 }}
script: |
# Set the branch to deploy
export DEPLOY_BRANCH="${{ github.event.inputs.branch }}"

# Navigate to the project directory
cd ${{ secrets.REPO_PATH || '/home/ubuntu/CHConferenceApp' }}

# Run the deployment script
cd backend
bash deploy.sh

- name: Deployment Status
if: success()
run: |
echo "✓ Backend deployed successfully from branch: ${{ github.event.inputs.branch }}"
echo "✓ Deployment completed at: $(date)"

- name: Deployment Failed
if: failure()
run: |
echo "✗ Backend deployment failed"
echo "Please check the AWS server logs for more details"
exit 1
40 changes: 40 additions & 0 deletions CocoaHeads.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading