Skip to content

Commit

Permalink
deployment stage
Browse files Browse the repository at this point in the history
  • Loading branch information
Kannan112 committed Dec 2, 2023
1 parent db2942c commit d519635
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,22 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Deploy to Server
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.EC2_SSH_KEY }}
REMOTE_HOST: ${{ secrets.HOST_DNS }}
REMOTE_USER: ${{ secrets.USERNAME }}
TARGET: ${{ secrets.TARGET_DIR }}

- name: Connect to EC2 instance
uses: appleboy/ssh-action@master
with:
host: ${{secrets.EC2_PUBLIC_IP}}
host: ${{ secrets.HOST_DNS }}
username: ubuntu
key: ${{secrets.EC2_SSH_KEY}}
key: ${{ secrets.EC2_SSH_KEY }}
script: |
cd ecommerce-fashionsture-cleanarch/
cd any-fashion-gin-clean-code
git pull
docker-compose down # Stop running containers
docker-compose up -d --build # Recreate and start containers

0 comments on commit d519635

Please sign in to comment.