Skip to content

Commit

Permalink
firestore data uploading
Browse files Browse the repository at this point in the history
  • Loading branch information
BraydenKO committed Dec 29, 2024
1 parent cc86918 commit 2cba038
Show file tree
Hide file tree
Showing 4 changed files with 192 additions and 268 deletions.
48 changes: 31 additions & 17 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,41 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: Deploy to Firebase

name: Deploy to Firebase Hosting on merge
on:
push:
branches:
- main

jobs:
build_and_deploy:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- run: echo 'no build process yet'
env:
VITE_API_KEY: ${{ secrets.FIREBASE_API_KEY }}
VITE_AUTH_DOMAIN: ${{ secrets.FIREBASE_AUTH_DOMAIN }}
VITE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }}
VITE_STORAGE_BUCKET: ${{ secrets.FIREBASE_STORAGE_BUCKET }}
VITE_MESSAGING_SENDER_ID: ${{ secrets.FIREBASE_MESSAGING_SENDER_ID }}
VITE_APP_ID: ${{ secrets.FIREBASE_APP_ID }}
- uses: FirebaseExtended/action-hosting-deploy@v0
- 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_FOLLOWDOT_27974 }}
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
channelId: live
projectId: followdot-27974
17 changes: 17 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "websitetest",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"devDependencies": {
"vite": "^6.0.5"
},
"dependencies": {
"firebase": "^11.1.0"
}
}
Loading

0 comments on commit 2cba038

Please sign in to comment.