Skip to content

Merge branch 'develop' into fe/feat/221 #2

Merge branch 'develop' into fe/feat/221

Merge branch 'develop' into fe/feat/221 #2

Workflow file for this run

name: 배포
on:
push:
branches: [ "develop" ]
jobs:
deploy:
runs-on: ubuntu-latest # 작업이 실행될 환경
steps:
- name: 체크아웃
uses: actions/checkout@v3
- name: 도커허브에 로그인
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER_NAME }}
password: ${{ secrets.DOCKER_USER_PW }}
- name: 이미지 빌드
run: docker buildx build --platform linux/amd64 -t ${{ secrets.DOCKER_USER_NAME }}/${{ secrets.DOCKER_IMAGE_NAME }}-fe:latest .

Check failure on line 19 in .github/workflows/front-cd.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/front-cd.yml

Invalid workflow file

You have an error in your yaml syntax on line 19
- name: 도커허브에 이미지 푸시
run: docker push ${{ secrets.DOCKER_USER_NAME }}/${{ secrets.DOCKER_IMAGE_NAME }}-fe:latest
- name: AWS EC2에 ssh 접속 후 배포
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.AWS_IP }}
port: 22
username: ubuntu
key: ${{ secrets.AWS_KEY }}
script: |
echo "AWS 연결"
docker pull ${{ secrets.DOCKER_USER_NAME }}/${{ secrets.DOCKER_IMAGE_NAME }}-fe:latest
docker-compose --env-file .env.production up -d