Skip to content

수정

수정 #40

Workflow file for this run

name: farmmate-server
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Install Dependencies
run: npm install
- name: Install ts-patch
run: npm install ts-patch --save-dev
- name: Check current directory and ts-patch installation
run: |
pwd
ls -l node_modules/.bin
npm list ts-patch
- name: Apply ts-patch
run: node_modules/.bin/ts-patch install
- name : Check npm list
run : ./node_modules/.bin/ts-patch install
- name: Install and apply typia
run: |
npm install typia
npx typia patch
- name: Build project
run: npm run build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
AWS-ACCESS-KEY-ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS-REGION: ${{ secrets.AWS_REGION }}
- name: Set up environment variables
run: |
echo "DB_TYPE=${{ secrets.DB_TYPE }}" >> $GITHUB_ENV
echo "DB_HOST=${{ secrets.DB_HOST }}" >> $GITHUB_ENV
echo "DB_PORT=${{ secrets.DB_PORT }}" >> $GITHUB_ENV
echo "DB_USERNAME=${{ secrets.DB_USERNAME }}" >> $GITHUB_ENV
echo "DB_PASSWORD=${{ secrets.DB_PASSWORD }}" >> $GITHUB_ENV
echo "DB_DATABASE=${{ secrets.DB_DATABASE }}" >> $GITHUB_ENV
env:
NODE_ENV: development
AWS_REGION: ap-northeast-2