Merge pull request #194 from techstudioconsults/cyber-security #122
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Node.js CI | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: self-hosted | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Copy env files from client config folder | |
run: cp -rf /var/www/config/.env /var/www/application/_work/Techstudio-site/Techstudio-site/ | |
- name: Install dependencies | |
run: npm install | |
- name: Build application | |
run: | | |
export NODE_OPTIONS="--max_old_space_size=4096" | |
CI=false npm run build --if-present | |
- name: Reload server instances | |
run: pm2 reload 0 --update-env --wait-ready |