Skip to content

firestore data uploading #4

firestore data uploading

firestore data uploading #4

name: Deploy to Firebase
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install Dependencies
run: npm install
- name: Create .env File
run: |
echo "API_KEY=${{ secrets.FIREBASE_API_KEY }}" >> .env.local
echo "AUTH_DOMAIN=${{ secrets.FIREBASE_AUTH_DOMAIN }}" >> .env.local
echo "PROJECT_ID=${{ secrets.FIREBASE_PROJECT_ID }}" >> .env.local
echo "STORAGE_BUCKET=${{ secrets.FIREBASE_STORAGE_BUCKET }}" >> .env.local
echo "MESSAGING_SENDER_ID=${{ secrets.FIREBASE_MESSAGING_SENDER_ID }}" >> .env.local
echo "APP_ID=${{ secrets.FIREBASE_APP_ID }}" >> .env.local
- name: Build Project
run: npm run build
- name: Deploy to Firebase
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
channelId: live