Skip to content

Commit 9ca3dd2

Browse files
committed
github: Replace firebase-deployment action
Replace firebase-deployment action by hand-crafted make targets. This has been motivated by an apparently broken firebase-tools release (4 hours old) that cannot be down-graded when using the firebase GitHub action and is a blocker. Aside: the foxygoat authors believe it is nice to stay third-party GitHub action free where possible so that the bulk of what's run on CI can also be run locally.
1 parent 71e7cca commit 9ca3dd2

File tree

4 files changed

+10
-34
lines changed

4 files changed

+10
-34
lines changed

.github/workflows/cicd.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v2
1313
- run: ./bin/make ci
14+
- run: ./bin/make firebase-deploy
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
FIREBASE_SERVICE_ACCOUNT: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_EVY_LANG }}
1418

1519
release:
1620
runs-on: ubuntu-latest
@@ -22,3 +26,6 @@ jobs:
2226
- run: ./bin/make release
2327
env:
2428
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
- run: ./bin/make firebase-deploy-prod
30+
env:
31+
FIREBASE_SERVICE_ACCOUNT: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_EVY_LANG }}

.github/workflows/firebase-hosting-merge.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/firebase-hosting-pull-request.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,13 @@ frontend-serve: frontend ## Build frontend and serve on free port
8686

8787
# --- firebase -----------------------------------------------------------------
8888
CHANNEL ?= dev
89+
AUTH_CI = $(if $(CI), { printenv FIREBASE_SERVICE_ACCOUNT > out/gac.json; export GOOGLE_APPLICATION_CREDENTIALS=out/gac.json; };)
8990

9091
firebase-deploy-prod: firebase-public ## Deploy to live channel on firebase, use with care!
91-
firebase --config firebase/firebase.json deploy
92+
$(AUTH_CI) firebase --config firebase/firebase.json deploy
9293

9394
firebase-deploy: firebase-public ## Deploy to dev (or other) channel on firebase
94-
firebase --config firebase/firebase.json hosting:channel:deploy $(CHANNEL)
95+
$(AUTH_CI) firebase --config firebase/firebase.json hosting:channel:deploy $(CHANNEL)
9596

9697
firebase-emulate: firebase-public ## Run firebase emulator for auth, hosting and datastore
9798
firebase --config firebase/firebase.json emulators:start

0 commit comments

Comments
 (0)