Skip to content

workflow ์ˆ˜์ • #5

workflow ์ˆ˜์ •

workflow ์ˆ˜์ • #5

Workflow file for this run

name: Deploy Frontend on Server via DockerHub
on:
workflow_dispatch:
push:
branches: [ main ]
env:
HOST: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
KEY: ${{ secrets.SSH_KEY }}
PORT: ${{ secrets.PORT }}
INSTANCE_PATH: ./AEYE-INFRA/frontend
IMAGE_NAME: shinsion/aeye-client
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout source code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tages: ${{ env.IMAGE_NAME }}:latest
- Pull Docker image to Server
uses: appleboy/ssh-action@master

Check failure on line 41 in .github/workflows/main-deploy.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/main-deploy.yml

Invalid workflow file

You have an error in your yaml syntax on line 41
with:
host: ${{ env.HOST }}
username: ${{ env.USERNAME }}
key: ${{ env.KEY }}
port: ${{ env.PORT }}
script: |
cd ${{ env.INSTANCE_PATH }}
docker stop aeye-frontend-client
docker rm aeye-frontend-client
docker rmi ${{ env.IMAGE_NAME }}:latest
docker compose up -d