Skip to content

React: Updated Regexes #27

React: Updated Regexes

React: Updated Regexes #27

Workflow file for this run

name: Unit Tests for Frontend & Deploy to Firebase Hosting
on:
push:
branches: [ "main" ]
paths:
- "frontend/**"
pull_request:
branches: [ "main" ]
workflow_dispatch:
permissions:
checks: write
contents: read
pull-requests: write
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.16.0
uses: actions/setup-node@v4
with:
node-version: '18.16.0'
- name: Install dependencies
working-directory: ./frontend
run: npm ci
- name: Run tests
working-directory: ./frontend
run: npm test
build-and-deploy:
needs: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.16.0
uses: actions/setup-node@v4
with:
node-version: '18.16.0'
- name: Install dependencies
working-directory: ./frontend
run: npm ci
- name: Build
working-directory: ./frontend
run: npm run build
- name: Deploy to Firebase Hosting
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_MATHMAZE_RG }}'
entryPoint: './frontend'
projectId: mathmaze-rg
channelId: live