From 1d98c55166fc0bbfae6eca0095517df33d8ef2c4 Mon Sep 17 00:00:00 2001 From: bvanroll Date: Mon, 23 Jan 2023 19:17:55 +0100 Subject: [PATCH] working? --- .firebaserc | 5 ++ .github/workflows/firebase-hosting-merge.yml | 20 +++++ .../firebase-hosting-pull-request.yml | 17 +++++ .gitignore | 2 + database.rules.json | 7 ++ firebase.json | 25 +++++++ public/404.html | 33 ++++++++ public/index.html | 75 +++++++++++++++++++ 8 files changed, 184 insertions(+) create mode 100644 .firebaserc create mode 100644 .github/workflows/firebase-hosting-merge.yml create mode 100644 .github/workflows/firebase-hosting-pull-request.yml create mode 100644 database.rules.json create mode 100644 firebase.json create mode 100644 public/404.html create mode 100644 public/index.html diff --git a/.firebaserc b/.firebaserc new file mode 100644 index 0000000..14e6d32 --- /dev/null +++ b/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "point-004-cent-humans" + } +} diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml new file mode 100644 index 0000000..7896bb1 --- /dev/null +++ b/.github/workflows/firebase-hosting-merge.yml @@ -0,0 +1,20 @@ +# This file was auto-generated by the Firebase CLI +# https://github.com/firebase/firebase-tools + +name: Deploy to Firebase Hosting on merge +'on': + push: + branches: + - master +jobs: + build_and_deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: npm ci && npm run build + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_POINT_004_CENT_HUMANS }}' + channelId: live + projectId: point-004-cent-humans diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml new file mode 100644 index 0000000..fd48a5c --- /dev/null +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -0,0 +1,17 @@ +# This file was auto-generated by the Firebase CLI +# https://github.com/firebase/firebase-tools + +name: Deploy to Firebase Hosting on PR +'on': pull_request +jobs: + build_and_preview: + if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: npm ci && npm run build + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_POINT_004_CENT_HUMANS }}' + projectId: point-004-cent-humans diff --git a/.gitignore b/.gitignore index 6704566..25c9d8a 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,5 @@ dist # TernJS port file .tern-port + +secret/* \ No newline at end of file diff --git a/database.rules.json b/database.rules.json new file mode 100644 index 0000000..ae5290a --- /dev/null +++ b/database.rules.json @@ -0,0 +1,7 @@ +{ + /* Visit https://firebase.google.com/docs/database/security to learn more about security rules. */ + "rules": { + ".read": true, + ".write": false + } +} \ No newline at end of file diff --git a/firebase.json b/firebase.json new file mode 100644 index 0000000..cdc70af --- /dev/null +++ b/firebase.json @@ -0,0 +1,25 @@ +{ + "database": { + "rules": "database.rules.json" + }, + "hosting": { + "public": "public", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ] + }, + "emulators": { + "database": { + "port": 9000 + }, + "hosting": { + "port": 5000 + }, + "ui": { + "enabled": true + }, + "singleProjectMode": true + } +} diff --git a/public/404.html b/public/404.html new file mode 100644 index 0000000..829eda8 --- /dev/null +++ b/public/404.html @@ -0,0 +1,33 @@ + + + + + + Page Not Found + + + + +
+

404

+

Page Not Found

+

The specified file was not found on this website. Please check the URL for mistakes and try again.

+

Why am I seeing this?

+

This page was generated by the Firebase Command-Line Interface. To modify it, edit the 404.html file in your project's configured public directory.

+
+ + diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..59f543a --- /dev/null +++ b/public/index.html @@ -0,0 +1,75 @@ + + + + + + Welcome to Firebase Hosting + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +