Skip to content

style: homepage responsive #32

style: homepage responsive

style: homepage responsive #32

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 for Staging
run: |
echo "VITE_BASE_API=${{ secrets.VITE_BASE_API }}" >> $GITHUB_ENV
echo "VITE_API_KEY=${{ secrets.VITE_API_KEY }}" >> $GITHUB_ENV
echo "VITE_AUTH_DOMAIN=${{ secrets.VITE_AUTH_DOMAIN }}" >> $GITHUB_ENV
echo "VITE_PROJECT_ID=${{ secrets.VITE_PROJECT_ID }}" >> $GITHUB_ENV
echo "VITE_STORAGE_BUCKET=${{ secrets.VITE_STORAGE_BUCKET }}" >> $GITHUB_ENV
echo "VITE_MESSAGING_SENDER_ID=${{ secrets.VITE_MESSAGING_SENDER_ID }}" >> $GITHUB_ENV
echo "VITE_APP_ID=${{ secrets.VITE_APP_ID }}" >> $GITHUB_ENV
echo "VITE_MEASUREMENT_ID=${{ secrets.VITE_MEASUREMENT_ID }}" >> $GITHUB_ENV
- name: Set Staging ID
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
echo "VITE_API_KEY=${{ secrets.VITE_API_KEY }}" >> $GITHUB_ENV
echo "VITE_AUTH_DOMAIN=${{ secrets.VITE_AUTH_DOMAIN }}" >> $GITHUB_ENV
echo "VITE_PROJECT_ID=${{ secrets.VITE_PROJECT_ID }}" >> $GITHUB_ENV
echo "VITE_STORAGE_BUCKET=${{ secrets.VITE_STORAGE_BUCKET }}" >> $GITHUB_ENV
echo "VITE_MESSAGING_SENDER_ID=${{ secrets.VITE_MESSAGING_SENDER_ID }}" >> $GITHUB_ENV
echo "VITE_APP_ID=${{ secrets.VITE_APP_ID }}" >> $GITHUB_ENV
echo "VITE_MEASUREMENT_ID=${{ secrets.VITE_MEASUREMENT_ID }}" >> $GITHUB_ENV
- name: Set Production ID
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 }}