Skip to content

fix : response data changed #18

fix : response data changed

fix : response data changed #18

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches: [ main ]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: jerneithe/category_service
- name: ec2 접속 및 애플리케이션 실행
uses : appleboy/ssh-action@v0.1.6
with :
host : ${{ secrets.EC2_HOST }}
username : ubuntu
key : ${{ secrets.EC2_PEMKEY }}
port : 22
script : |
echo "${{ secrets.ENV }}" | base64 --decode > /home/ubuntu/.env
sudo docker stop $(sudo docker ps -a -q)
sudo docker rm $(sudo docker ps -a -q)
sudo docker pull jerneithe/category_service
sudo docker run -d -p 8080:8080 -v /home/ubuntu/.env:/app/env jerneithe/category_service