Skip to content

Commit 03315e6

Browse files
committed
firebase: Deploy first version
Use firebase boilerplate .html pages, initially written to out/public and move them to source directory `frontend`. Later we will use `frontend` for frontend source code, probably written in SvelteJS. Add make targets for frontend builds and firebase tests and deployment. firebase puts various log files alongside the firebase.json which really bloats the root directory, so move everything firebase related to `firebase`. In order to start the emulator with `make firebase-test` java is required so install openjre with hermit: hermit install openjre Signed-off-by: Julia Ogris <julia.ogris@gmail.com>
1 parent 8117645 commit 03315e6

File tree

20 files changed

+155
-7
lines changed

20 files changed

+155
-7
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ jobs:
1414
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_EVY_LANG }}'
1515
channelId: live
1616
projectId: evy-lang
17+
entryPoint: firebase

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# This file was auto-generated by the Firebase CLI
2-
# https://github.com/firebase/firebase-tools
3-
41
name: Deploy to Firebase Hosting on PR
5-
'on': pull_request
2+
on: pull_request
63
jobs:
74
build_and_preview:
85
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
@@ -15,3 +12,4 @@ jobs:
1512
repoToken: '${{ secrets.GITHUB_TOKEN }}'
1613
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_EVY_LANG }}'
1714
projectId: evy-lang
15+
entryPoint: firebase

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
/firebase/*.log
2+
/firebase/.firebase/
13
/out/

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,19 @@ lint: ## Lint go source code
6464

6565
.PHONY: lint
6666

67+
# --- frontend -----------------------------------------------------------------
68+
frontend: | $(O) ## Build frontend, typically iterate with npm and inside frontend
69+
rm -rf $(O)/public
70+
cp -r frontend $(O)/public
71+
72+
firebase-deploy: frontend ## Deploy to live channel on firebase, use with care
73+
firebase --config firebase/firebase.json deploy
74+
75+
firebase-test: frontend ## Run firebase emulator for auth, hosting and datastore
76+
firebase --config firebase/firebase.json emulators:start
77+
78+
.PHONY: firebase-deploy firebase-test frontend
79+
6780
# --- Release -------------------------------------------------------------------
6881
release: nexttag ## Tag and release binaries for different OS on GitHub release
6982
git tag $(NEXTTAG)

bin/.openjre-11.0.10_9.pkg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hermit

bin/jaotc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.openjre-11.0.10_9.pkg

bin/java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.openjre-11.0.10_9.pkg

bin/jfr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.openjre-11.0.10_9.pkg

bin/jjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.openjre-11.0.10_9.pkg

bin/jrunscript

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.openjre-11.0.10_9.pkg

0 commit comments

Comments
 (0)