Skip to content

Merge pull request #144 from JakubBialoskorski/snyk-upgrade-db79dad81… #190

Merge pull request #144 from JakubBialoskorski/snyk-upgrade-db79dad81…

Merge pull request #144 from JakubBialoskorski/snyk-upgrade-db79dad81… #190

name: Node.js CI
on:
push:
branches: [ master ]
jobs:
cypress-run:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Build the project
run: npm run build
- name: Start server
run: npm start &
env:
CI: true
- name: Wait for server
run: npx wait-on http://127.0.0.1:3000
- name: Cypress run
uses: cypress-io/github-action@v5
build:
# Tests needs to pass before deploying further
needs: cypress-run
runs-on: ubuntu-latest
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v3
# a standard step for GitHub actions on Node
# https://github.com/actions/setup-node
- uses: actions/setup-node@v3
with:
# update the Node version to meet your needs
node-version: 18
cache: npm
- name: Build
run: |
npm ci
npm run build
npm run export
touch out/.nojekyll
- name: Deploy
# https://github.com/JamesIves/github-pages-deploy-action
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: out