Skip to content

Commit

Permalink
Deploy functions, rules on merge
Browse files Browse the repository at this point in the history
  • Loading branch information
sbutz committed Nov 27, 2023
1 parent 8b50409 commit bd8a475
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,22 @@ jobs:
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_POOLSCORE_1973 }}'
channelId: live
projectId: poolscore-1973

firestore_deploy:
runs-on: ubuntu-latest
env:
working-directory: ./firestore
steps:
- uses: actions/checkout@v3
- run: npm deploy
working-directory: ${{env.working-directory}}

function_deploy:
runs-on: ubuntu-latest
env:
working-directory: ./functions
steps:
- uses: actions/checkout@v3
- run: npm ci && npm run build
working-directory: ${{env.working-directory}}
- run: npm deploy
1 change: 1 addition & 0 deletions firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"author": "",
"license": "ISC",
"scripts": {
"deploy": "npx firebase-tools 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
2 changes: 1 addition & 1 deletion functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "tsc",
"build:watch": "tsc --watch",
"predeploy": "npm run build",
"deploy": "npx firebase-tools deploy --only functions",
"deploy": "npx firebase-tools deploy --force --only functions",
"pretest": "npm run build",
"test": "npx firebase-tools emulators:exec --only 'functions,firestore,auth' 'npx jest'",
"test:watch": "concurrently --kill-others \"npm:build:watch\" \"npx firebase-tools emulators:exec 'npx jest --watch'\""
Expand Down

0 comments on commit bd8a475

Please sign in to comment.