🔥 Firebase hosting (#8)

* init Firebase

* add release step to github actions

* fix syntax error

* fix syntax error #2

* fix syntax error #3

* untrack firebase config files
This commit is contained in:
Ruidy 2020-05-16 15:58:04 +02:00 committed by GitHub
parent 9e30322ffc
commit 1e913e7760
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 198 additions and 6 deletions

View file

@ -25,3 +25,16 @@ jobs:
with:
start: yarn start
wait-on: 'http://localhost:3000'
release:
if: ${{ github.ref == 'master' }}
needs: test
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: yarn build
- name: Install Firebase CLI tools
run: yarn global add firebase-tools
- name: Deploy
run: firebase deploy --token ${{ secrets.FIREBASE_TOKEN }}

6
.gitignore vendored
View file

@ -27,4 +27,8 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
.env
.env
.firebase
firebase*json
*rules
.firebaserc

View file

@ -1,5 +0,0 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}

117
firestore.indexes.json Normal file
View file

@ -0,0 +1,117 @@
{
"indexes": [
{
"collectionGroup": "restaurants",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "category",
"order": "ASCENDING"
},
{
"fieldPath": "avgRating",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "restaurants",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "category",
"order": "ASCENDING"
},
{
"fieldPath": "numRatings",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "restaurants",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "category",
"order": "ASCENDING"
},
{
"fieldPath": "price",
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "restaurants",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "city",
"order": "ASCENDING"
},
{
"fieldPath": "avgRating",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "restaurants",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "city",
"order": "ASCENDING"
},
{
"fieldPath": "numRatings",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "restaurants",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "city",
"order": "ASCENDING"
},
{
"fieldPath": "price",
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "restaurants",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "price",
"order": "ASCENDING"
},
{
"fieldPath": "avgRating",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "restaurants",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "price",
"order": "ASCENDING"
},
{
"fieldPath": "numRatings",
"order": "DESCENDING"
}
]
}
],
"fieldOverrides": []
}

63
tslint.json Normal file
View file

@ -0,0 +1,63 @@
{
"rules": {
"adjacent-overload-signatures": true,
"ban-comma-operator": true,
"no-namespace": true,
"no-parameter-reassignment": true,
"no-reference": true,
"no-unnecessary-type-assertion": true,
"label-position": true,
"no-conditional-assignment": true,
"no-construct": true,
"no-duplicate-super": true,
"no-duplicate-switch-case": true,
"no-duplicate-variable": [
true,
"check-parameters"
],
"no-shadowed-variable": true,
"no-empty": [
true,
"allow-empty-catch"
],
"no-floating-promises": true,
"no-implicit-dependencies": true,
"no-invalid-this": true,
"no-string-throw": true,
"no-unsafe-finally": true,
"no-void-expression": [
true,
"ignore-arrow-function-shorthand"
],
"no-duplicate-imports": true,
// Warn when an empty interface is defined. These are generally not useful.
"no-empty-interface": {
"severity": "warning"
},
"no-import-side-effect": {
"severity": "warning"
},
"no-var-keyword": {
"severity": "warning"
},
"triple-equals": {
"severity": "warning"
},
"deprecation": {
"severity": "warning"
},
"prefer-for-of": {
"severity": "warning"
},
"unified-signatures": {
"severity": "warning"
},
"prefer-const": {
"severity": "warning"
},
"trailing-comma": {
"severity": "warning"
}
},
"defaultSeverity": "error"
}