Skip to content

Commit 1fdf9a2

Browse files
committed
add firebase deploy infos
1 parent 2e82520 commit 1fdf9a2

File tree

5 files changed

+44
-1
lines changed

5 files changed

+44
-1
lines changed

.firebaserc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"projects": {
3+
"default": "cp-algorithms"
4+
}
5+
}

.github/workflows/deploy-prod.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Deploy to Live Channel
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
deploy_live_website:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v2
14+
- name: Build docker image
15+
run: |
16+
docker build -f build/Dockerfile . -t e-maxx-eng-builder
17+
- name: Build static HTML
18+
run: |
19+
docker run -v $PWD/public:/output -e BASEURL="https://cp-algorithms.web.app" e-maxx-eng-builder:latest
20+
- uses: FirebaseExtended/action-hosting-deploy@v0
21+
with:
22+
repoToken: "${{ secrets.GITHUB_TOKEN }}"
23+
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
24+
projectId: cp-algorithms
25+
channelId: live

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ converted.html
66
converted.pdf
77
/output
88
/public
9+
.firebase/
10+
firebase-debug.log

build/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ mkdir public
99
docker run -v $PWD/public:/output -e BASEURL="$PWD/public/" e-maxx-eng-builder:latest
1010
```
1111
`/output` is the directory where the Docker container will export the files to.
12-
The `BASEURL` is the base of all urls. Per default it is [https://cp-algorithms.com](https://cp-algorithms.com).
12+
The `BASEURL` is the base of all urls.
13+
If you want to test it locally, e.g. you can set it `BASEURL=$PWD/public`, if you want to test it with Firebase (`firebase emulators:start`), use `BASEURL="http://localhost:5000"`, or if you want to deploy it to [https://cp-algorithms.com](https://cp-algorithms.com), use `BASEURL="https://cp-algorithms.com"`.

firebase.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"hosting": {
3+
"public": "public",
4+
"ignore": [
5+
"firebase.json",
6+
"**/.*",
7+
"**/node_modules/**"
8+
]
9+
}
10+
}

0 commit comments

Comments
 (0)