Skip to content

sorting workouts correctly now -- had to update how dates are SENT to… #25

sorting workouts correctly now -- had to update how dates are SENT to…

sorting workouts correctly now -- had to update how dates are SENT to… #25

name: Deploy on Main Push
on:
push:
branches:
- main
paths:
- "src/**"
- "public/**"
- "firebase.json"
- "package.json"
- "index.html"
- "vitest.config.js"
- ".firebaserc"
- ".github/workflows/*"
concurrency:
group: firebase-deploy-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-deploy:
name: 🛠️ Build and Deploy
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout Code
uses: actions/checkout@v4
- name: 🛠️ Setup Node
uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: "npm"
- name: 📂 Restore npm cache
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-cache-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-cache-
- name: 📂 Install Packages
run: npm ci
- name: 🧱 Inject Environment Variables
run: |
echo "VITE_FIREBASE_API_KEY=${{ secrets.FIREBASE_API_KEY }}" >> .env
echo "VITE_FIREBASE_AUTH_DOMAIN=${{ secrets.FIREBASE_AUTH_DOMAIN }}" >> .env
echo "VITE_FIREBASE_DATABASE_URL=${{ secrets.FIREBASE_DATABASE_URL }}" >> .env
echo "VITE_FIREBASE_PROJECT_ID=${{ secrets.FIREBASE_PROJECT_ID }}" >> .env
echo "VITE_FIREBASE_STORAGE_BUCKET=${{ secrets.FIREBASE_STORAGE_BUCKET }}" >> .env
echo "VITE_FIREBASE_MESSAGING_SENDER_ID=${{ secrets.FIREBASE_MESSAGING_SENDER_ID }}" >> .env
echo "VITE_FIREBASE_APP_ID=${{ secrets.FIREBASE_APP_ID }}" >> .env
- name: 🧱 Build Project
run: npm run build
- name: 🚀 Deploy to Firebase
if: success()
uses: FirebaseExtended/action-hosting-deploy@v0
with:
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
projectId: "${{ secrets.FIREBASE_PROJECT_ID }}"
channelId: live