Skip to content

Merge pull request #60 from Alpha-e-Um/feature/#59-ResumeDetail #26

Merge pull request #60 from Alpha-e-Um/feature/#59-ResumeDetail

Merge pull request #60 from Alpha-e-Um/feature/#59-ResumeDetail #26

Workflow file for this run

name: Deploy React
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: react docker build and push
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker build -t ${{ secrets.DOCKER_REPO }}/eum-react:latest .
docker push ${{ secrets.DOCKER_REPO }}/eum-react:latest
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.AWS_HOST }}
username: ubuntu
key: ${{ secrets.AWS_KEY }}
script: |
if [ "$(sudo docker ps -qa)" ]; then
sudo docker rm -f $(sudo docker ps -qa)
fi
sudo docker pull ${{ secrets.DOCKER_REPO }}/eum-react:latest
sudo docker-compose -f alpha-e_um-deploy/docker-compose.yml up -d
sudo docker image prune -f