-
Notifications
You must be signed in to change notification settings - Fork 5
Deployment
Pascal Jordin edited this page Feb 4, 2020
·
1 revision
Deploying the app to Firebase
1. Create a new Firebase project
2. Install Firebase CLI and authenticate (firebase login
)
{
"firstName": "John",
"lastName": "Smith",
"email": "[email protected]"
}
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if false;
}
match /users/{userId} {
allow read, update, delete: if request.auth.uid == userId;
allow create: if request.auth.uid != null;
}
}
}
7. Go to your firebase console and grap your firebase SDK config an replace it in /src/app/firebase/firebase.ts
const firebaseConfig = {
apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
authDomain: "xxxxxx.firebaseapp.com",
databaseURL: "https://xxxxxx.firebaseio.com",
projectId: "xxxxxx",
storageBucket: "xxxxxx.appspot.com",
messagingSenderId: "xxxxxx",
appId: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
measurementId: "xxxxxx"
};
8. Setup your repository GitHub Actions:
- Copy the workflow
main.yml
from/.github/workflows/main.yml
- Setup your repository
Secrets
under repository settings:FIREBASE_TOKEN
,PROJECT_ID
- Commit to
master