Skip to content

Refactor security middleware in app.js #11

Refactor security middleware in app.js

Refactor security middleware in app.js #11

Workflow file for this run

name: Node.js Production
on:
push:
branches: [main]
jobs:
build:
runs-on: [self-hosted, main]
env:
NODE_ENV: production
DOTENV_KEY: ${{ secrets.DOTENV_KEY }}
steps:
- uses: actions/checkout@v3
- name: Set dotenv variable
run: |
export NODE_ENV=production
export DOTENV_KEY="${{ secrets.DOTENV_KEY }}"
export NODE_TLS_REJECT_UNAUTHORIZED=0
- name: Start PM2
run: pm2 status || pm2 resurrect
- name: Install Node.js dependencies
run: npm install
- name: Start application
run: pm2 describe tictactoe-production &> /dev/null && pm2 reload ecosystem.config.js --env production --update-env || pm2 start ecosystem.config.js --env production