Skip to content

Commit 3ea0f5c

Browse files
authored
chore: Use the firebase github workflows (#31)
* chore: Use the firebase github workflows Signed-off-by: Roger Barker <[email protected]> * chore: Add permissions block to firebase-hosting-merge Signed-off-by: Roger Barker <[email protected]> --------- Signed-off-by: Roger Barker <[email protected]> Co-authored-by: Roger Barker <[email protected]>
1 parent ebf20e9 commit 3ea0f5c

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This file was auto-generated by the Firebase CLI
2+
# https://github.com/firebase/firebase-tools
3+
4+
name: Deploy to Firebase Hosting on merge
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
build_and_deploy:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Harden Runner
19+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
20+
with:
21+
egress-policy: audit
22+
23+
- name: Checkout Code
24+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
25+
26+
- name: Deploy to Firebase Hosting (live)
27+
uses: FirebaseExtended/action-hosting-deploy@0cbcac4740c2bfb00d632f0b863b57713124eb5a # v0.9.0
28+
with:
29+
repoToken: ${{ secrets.GITHUB_TOKEN }}
30+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PANDAS_WHO_CODE }}
31+
channelId: live
32+
projectId: pandas-who-code
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This file was auto-generated by the Firebase CLI
2+
# https://github.com/firebase/firebase-tools
3+
4+
name: Deploy to Firebase Hosting on PR
5+
6+
on: pull_request
7+
8+
permissions:
9+
checks: write
10+
contents: read
11+
pull-requests: write
12+
13+
jobs:
14+
build_and_preview:
15+
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Harden Runner
19+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
20+
with:
21+
egress-policy: audit
22+
23+
- name: Checkout Code
24+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
25+
26+
- name: Deploy to Firebase Hosting on PR
27+
uses: FirebaseExtended/action-hosting-deploy@0cbcac4740c2bfb00d632f0b863b57713124eb5a # v0.9.0
28+
with:
29+
repoToken: ${{ secrets.GITHUB_TOKEN }}
30+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PANDAS_WHO_CODE }}
31+
projectId: pandas-who-code

0 commit comments

Comments
 (0)