Skip to content

chore: minore responsiveness #29

chore: minore responsiveness

chore: minore responsiveness #29

name: Deploy to Firebase Hosting
on:
push:
branches:
- main
jobs:
Staging:
runs-on: ubuntu-latest
environment:
name: Staging
url : "https://pensdown-staging.web.app"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '19'
- name: Install Firebase CLI
run: npm install -g firebase-tools
- name: Set Environment Variables Base API
run: echo "VITE_BASE_API=${{ secrets.VITE_BASE_API }}" >> $GITHUB_ENV
- name: Set Environment Variables Staging
run: echo "FIREBASE_PROJECT_ID=${{ secrets.STAGING }}" >> $GITHUB_ENV
- name: Install Dependencies
run: npm install --force
- name: Build Vite Project
run: npm run build
- name: Deploy to Firebase (Staging)
run: firebase deploy --token ${{ secrets.FIREBASE_TOKEN }} --only hosting --project ${{ env.FIREBASE_PROJECT_ID }}
Production:
needs: [Staging]
runs-on: ubuntu-latest
environment:
name: Production
url : "https://pensdown-dad2d.firebaseapp.com/"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '19'
- name: Install Firebase CLI
run: npm install -g firebase-tools
- name: Set Environment Variables for Production
run: echo "VITE_BASE_API=${{ secrets.VITE_BASE_API }}" >> $GITHUB_ENV
- name: Set Environment Variables for Production
run: echo "FIREBASE_PROJECT_ID=${{ secrets.PRODUCTION }}" >> $GITHUB_ENV
- name: Install Dependencies
run: npm install --force
- name: Build Vite Project
run: npm run build
- name: Deploy to Firebase (Production)
run: firebase deploy --token ${{ secrets.FIREBASE_TOKEN }} --only hosting --project ${{ env.FIREBASE_PROJECT_ID }}