Skip to content

Commit

Permalink
Merge pull request #1 from develop
Browse files Browse the repository at this point in the history
Firebase Configs
  • Loading branch information
gileadeteixeira authored Nov 12, 2021
2 parents 7d53a2f + 2dec5a1 commit 31e0807
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 26 deletions.
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "gileadedev"
}
}
6 changes: 3 additions & 3 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: 'npm ci && npm run build'
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_PORTFOLIOGILEADE }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_GILEADEDEV }}'
channelId: live
projectId: portfoliogileade
projectId: gileadedev
6 changes: 3 additions & 3 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: 'npm ci && npm run build'
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_PORTFOLIOGILEADE }}'
projectId: portfoliogileade
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_GILEADEDEV }}'
projectId: gileadedev
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

# production
/build
.firebase

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
.env

npm-debug.log*
yarn-debug.log*
Expand Down
8 changes: 1 addition & 7 deletions firebase/firebase.json → firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,11 @@
"indexes": "firestore.indexes.json"
},
"hosting": {
"public": "public",
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
"storage": {
Expand Down
5 changes: 0 additions & 5 deletions firebase/.firebaserc

This file was deleted.

22 changes: 22 additions & 0 deletions firebase/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import firebase from "firebase/app";
import firestore from "firebase/firestore"
import storage from "firebase/storage";
import { getAnalytics } from "firebase/analytics";

const firebaseConfig = {
apiKey: process.env.FIREBASE_API_KEY,
authDomain: process.env.FIREBASE_AUTH_DOMAIN,
projectId: process.env.FIREBASE_PROJECT_ID,
storageBucket: process.env.FIREBASE_STORAGE_BUCKET,
messagingSenderId: process.env.FIREBASE_MESSAGING_SENDER_ID,
appId: process.env.FIREBASE_APP_ID,
measurementId: process.env.FIREBASE_MEASUREMENT_ID
};

// Initialize Firebase
const app = firebase.initializeApp(firebaseConfig);
const analytics = getAnalytics(app);

export const Firebase = firebase;
export const Storage = storage.getStorage();
export const Firestore = firestore.getFirestore();
File renamed without changes.
File renamed without changes.
18 changes: 15 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"dotenv": "^10.0.0",
"firebase": "^9.4.1",
"git-last-commit": "^1.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
Expand Down
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function App() {
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
Edit <code>src/App.js</code> and save to reload!
</p>
<a
className="App-link"
Expand Down
File renamed without changes.

0 comments on commit 31e0807

Please sign in to comment.