Skip to content

Commit

Permalink
Test deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
sbutz committed Dec 18, 2023
1 parent 451271a commit c9653ea
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/deploy-on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@ on:
push:
branches:
- master
##TODO: remove
pull_request:
types:
- opened
- synchronize
- reopend
jobs:
firestore_deploy:
runs-on: ubuntu-latest
env:
working-directory: ./firestore
GOOGLE_APPLICATION_CREDENTIALS: /opt/gcp_key.json
steps:
- uses: actions/checkout@v3
- name: Export service account credentials to file
run: echo '${{ secrets.FIREBASE_SERVICE_ACCOUNT_POOLSCORE_1973 }}' > '${{ env.GOOGLE_APPLICATION_CREDENTIALS }}'
- run: npm run deploy
working-directory: ${{env.working-directory}}

Expand All @@ -21,8 +30,11 @@ jobs:
runs-on: ubuntu-latest
env:
working-directory: ./functions
GOOGLE_APPLICATION_CREDENTIALS: /opt/gcp_key.json
steps:
- uses: actions/checkout@v3
- name: Export service account credentials to file
- run: echo '${{ secrets.FIREBASE_SERVICE_ACCOUNT_POOLSCORE_1973 }}' > '${{ env.GOOGLE_APPLICATION_CREDENTIALS }}'
- run: npm ci && npm run build
working-directory: ${{env.working-directory}}
- run: npm run deploy
Expand Down
2 changes: 1 addition & 1 deletion firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"author": "",
"license": "ISC",
"scripts": {
"deploy": "npx firebase-tools deploy --only firestore:rules",
"deploy": "npx firebase-tools --debug deploy --only firestore:rules",
"test": "npx firebase-tools emulators:exec --only firestore test/run.sh",
"export": "npx firebase-tools emulators:export ./emulator_data",
"lint": "eslint test/"
Expand Down

0 comments on commit c9653ea

Please sign in to comment.