Skip to content

Commit

Permalink
fix: deployTest.yml 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
osdoonhyun committed Jan 16, 2024
1 parent f774d24 commit 5bdc452
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/deployTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Checkout Repository
uses: actions/checkout@v2

- name: Build and Push Docker Images
env:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
run: |
docker-compose build
echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_USERNAME" --password-stdin
docker-compose push
- name: Build and Push Docker Images
env:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
run: |
docker-compose build
echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_USERNAME" --password-stdin
docker-compose push
- name: SSH into EC2 and Deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_PRIVATE_KEY }}
port: ${{ secrets.EC2_PORT }}
script: |
cd /path/to/your/app
docker-compose pull
docker-compose up -d
- name: SSH into EC2 and Deploy
uses: appleboy/ssh-action@master
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
password: ${{ secrets.EC2_PASSWORD}}
script: |
cd Sel-Q
docker-compose pull
docker-compose up -d

0 comments on commit 5bdc452

Please sign in to comment.