Skip to content

chore: set up Github deploy workflows #1

chore: set up Github deploy workflows

chore: set up Github deploy workflows #1

Workflow file for this run

name: deploy
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["18.17.0"]
services:
mongodb:
image: mongo
ports:
- 27017:27017
redis:
image: redis
ports:
- 6379:6379
env:
NODE_ENV: ci
PORT: 3000
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: |
npm install --legacy-peer-deps
npm run build
- name: Start server
run: |
nohup npm run start &
sleep 3
- name: Run tests
run: npm run test