Skip to content

change runner

change runner #11

Workflow file for this run

name: Node.js CI
on:
push:
branches: [ 'master', 'workflows-action' ]
pull_request:
branches: [ 'master', 'workflows-action' ]
jobs:
build-and-start:
runs-on: self-hosted
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install back-end dependencies
run: |
hostname
pwd
cd back-end
npm install
- name: Start back-end
run: |
cd back-end
npm start &
sleep 10 # Waits 10 seconds to ensure back-end is up
- name: Install front-end dependencies
run: |
cd front-end
npm install
- name: Start front-end
run: |
cd front-end
npm start &
sleep 10 # Waits 10 seconds to ensure front-end is up
# console.log
# pwd: which place
# run these steps on where
# how to automatically copy code to the server -->