Skip to content

Merge pull request #35 from jwpark1211/develop #29

Merge pull request #35 from jwpark1211/develop

Merge pull request #35 from jwpark1211/develop #29

Workflow file for this run

name: Backend CD
on:
push:
branches:
- "master"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: WAS 인스턴스 접속 및 애플리케이션 실행
uses: appleboy/[email protected]
with:
host: ${{ secrets.AWS_IP }}
username: ubuntu
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
sudo docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
sudo docker stop $(docker ps -a -q)
sudo docker rm $(docker ps -a -q)
sudo docker pull ${{ secrets.DOCKER_REPOSITORY }}
sudo docker run -d -p 8080:8080 --name new ${{ secrets.DOCKER_REPOSITORY }}