Skip to content

Fix service account credential path in workflow #2

Fix service account credential path in workflow

Fix service account credential path in workflow #2

Workflow file for this run

name: Build and Deploy to Firebase
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build Astro site
run: npm run build
- name: Create service account file
run: echo '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}' > ${{ github.workspace }}/gcloud-service-key.json
- name: Deploy to Firebase
run: |
npm install -g firebase-tools
firebase deploy --only hosting --non-interactive
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ github.workspace }}/gcloud-service-key.json