Skip to content

fix: Update vite.config.ts #41

fix: Update vite.config.ts

fix: Update vite.config.ts #41

Workflow file for this run

name: Frontend 배포
on:
push:
branches: ['main']
jobs:
build:
runs-on: ubuntu-latest
environment: dev
steps:
# Checkout the repository
- uses: actions/checkout@v3
# Install pnpm globally
- name: Install pnpm globally
run: npm install -g pnpm
# Check Node.js version
- name: Check Node.js version
run: node -v
# Install dependencies
- name: Install dependencies
run: pnpm install
# Build the project
- name: Build
run: pnpm run build
# Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Docker Login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
# Deploy Docker container (example deployment command)
- name: Build and Push Docker Image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/familynote-web:latest .
docker push ${{ secrets.DOCKER_USERNAME }}/familynote-web:latest
deploy:
needs: build
runs-on: ubuntu-latest
environment: dev
steps:
- name: Deploy to NCP
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.NCP_HOST }}
username: ${{ secrets.NCP_USERNAME }}
password: ${{ secrets.NCP_PASSWORD }}
port: ${{ secrets.NCP_PORT }}
script: |
sudo docker-compose -f /root/docker-compose.yml pull
sudo docker-compose -f /root/docker-compose.yml up -d
sudo docker run -d ${{ secrets.DOCKER_USERNAME }}/familynote-web:latest