Skip to content

Merge branch 'main' of https://github.com/392-f24/FitForecast #8

Merge branch 'main' of https://github.com/392-f24/FitForecast

Merge branch 'main' of https://github.com/392-f24/FitForecast #8

Workflow file for this run

name: React CI
on: [push]
jobs:
build:
name: Build and unit test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- run: npm install
- run: npm run build --if-present
env:
VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }}
VITE_OPENWEATHER_API_KEY: ${{ secrets.VITE_OPENWEATHER_API_KEY }}
- run: npm test
deploy:
name: Firebase deploy
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- run: npm install
- run: npm run build
env:
VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }}
VITE_OPENWEATHER_API_KEY: ${{ secrets.VITE_OPENWEATHER_API_KEY }}
- run: npm install -g firebase-tools
- run: firebase deploy --token "${{ secrets.FIREBASE_DEPLOY_TOKEN }}" --non-interactive