Skip to content

Commit

Permalink
🚀 deploy config update
Browse files Browse the repository at this point in the history
Related:
  • Loading branch information
L-U-Ready committed Nov 11, 2024
1 parent 9ff0fd6 commit 1c2e590
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
run: |
echo "${{ secrets.EC2_SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo "SSH key created."
- name: Connect to EC2 and deploy
uses: appleboy/ssh-action@master
Expand All @@ -51,9 +52,9 @@ jobs:
username: ec2-user
key_path: ~/.ssh/id_rsa
script: |
# Stop and remove any existing application container
docker-compose down || true
# Pull the latest image
echo "Stopping and removing any existing application container..."
docker-compose -f /path/to/your/docker-compose.yml down || true
echo "Pulling the latest Docker image..."
docker pull ${{ secrets.DOCKER_USERNAME }}/learnmate:latest
# Start application with docker-compose
docker-compose up -d
echo "Starting application with docker-compose..."
docker-compose -f /path/to/your/docker-compose.yml up -d

0 comments on commit 1c2e590

Please sign in to comment.