From c5f3d551c7352382fab5e4c712766f6291a8d5af Mon Sep 17 00:00:00 2001 From: schmelczerandras Date: Mon, 21 Sep 2020 16:16:55 +0200 Subject: [PATCH] Configure firebase hosting --- .firebaserc | 5 +++++ .github/workflows/main.yaml | 21 +++++++++++++++++++++ .gitignore | 1 + firebase.json | 10 ++++++++++ 4 files changed, 37 insertions(+) create mode 100644 .firebaserc create mode 100644 .github/workflows/main.yaml create mode 100644 firebase.json diff --git a/.firebaserc b/.firebaserc new file mode 100644 index 0000000..d585736 --- /dev/null +++ b/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "schmelczer-dev" + } +} diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..649a0e1 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,21 @@ +name: Deploy site +on: + push: + branches: + - main +jobs: + firebase-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout current branch with lfs + uses: actions/checkout@master + - name: Build site + run: | + npm install + npm run build + - name: Deploy html + uses: w9jds/firebase-action@master + with: + args: deploy --only hosting --project schmelczer-dev + env: + FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} diff --git a/.gitignore b/.gitignore index 4a9d836..348ddad 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ dist node_modules package-lock.json .vscode +.firebase diff --git a/firebase.json b/firebase.json new file mode 100644 index 0000000..059fe4f --- /dev/null +++ b/firebase.json @@ -0,0 +1,10 @@ +{ + "hosting": { + "public": "dist", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ] + } +}