Skip to content

fix: Add category system to word generation #88

fix: Add category system to word generation

fix: Add category system to word generation #88

Workflow file for this run

name: Server CI/CD
on:
push:
branches: [develop]
paths:
- 'server/**'
- 'core/**'
- '.github/workflows/server-ci-cd.yml'
- 'Dockerfile.server'
jobs:
ci-cd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: '9'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build Core Package
working-directory: ./core
run: pnpm build
- name: Create .env file
working-directory: ./server
run: |
echo "REDIS_HOST=${{ secrets.REDIS_HOST }}" >> .env
echo "REDIS_PORT=${{ secrets.REDIS_PORT }}" >> .env
echo "CLOVA_API_KEY=${{ secrets.CLOVA_API_KEY }}" >> .env
echo "CLOVA_GATEWAY_KEY=${{ secrets.CLOVA_GATEWAY_KEY }}" >> .env
- name: Run tests
run: pnpm --filter server test | true
- name: Docker Setup
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.server
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/troublepainter-server:latest
build-args: |
REDIS_HOST=${{ secrets.REDIS_HOST }}
REDIS_PORT=${{ secrets.REDIS_PORT }}
CLOVA_API_KEY=${{ secrets.CLOVA_API_KEY }}
CLOVA_GATEWAY_KEY=${{ secrets.CLOVA_GATEWAY_KEY }}
- name: Deploy to Server
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: mira
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd /home/mira/web30-stop-troublepainter
export DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}
docker pull ${{ secrets.DOCKERHUB_USERNAME }}/troublepainter-server:latest
docker compose up -d server