Skip to content

[INFRA] CI/CD 환경 구축 #10

[INFRA] CI/CD 환경 구축

[INFRA] CI/CD 환경 구축 #10

Workflow file for this run

name: SOPT Notification Server CI
on:
workflow_dispatch:
pull_request:
branches: [ develop ]
jobs:
validate:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Install Dependencies
run: npm ci
# - name: Run Lint
# run: npm run lint
- name: Build Project
run: npm run build
- name: Run Serverless-offline
env:
ENV_FILE: ${{ secrets.ENV_DEV }}
run: |
touch .env.dev
echo "$ENV_FILE" >> .env.dev
nohup npm run start > nohup.out 2>&1 &
sleep 5
if grep -q "Server ready" nohup.out; then
echo "Application Run Success."
else
echo "Application Run Fail."
exit 1
fi
shell: bash
- name: Run Validate Script
run: |
sudo chmod +x .github/valid.sh
./.github/valid.sh
shell: bash