From bbca604f73adf53f7cd4f0a299574813b049ffe7 Mon Sep 17 00:00:00 2001 From: Gabriel Karczewski Date: Fri, 26 Apr 2024 19:43:44 +0200 Subject: [PATCH] add firebase hosting deployment --- .github/workflows/deploy.yml | 22 ++++++++++++++++++++++ firebase.json | 17 +++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/deploy.yml create mode 100644 firebase.json diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..6b80386 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,22 @@ +--- +name: Deploy +on: + push: + branches: main +jobs: + deploy: + runs-on: ubuntu-22.04 + container: node:20-alpine + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Install dependencies + run: npm i + - name: Build the site + run: npm run build + - name: Deploy to Firebase Hosting + uses: FirebaseExtended/action-hosting-deploy@v0 + with: + firebaseServiceAccount: "${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}" + projectId: personal-419019 + channelId: live diff --git a/firebase.json b/firebase.json new file mode 100644 index 0000000..c3ddbbd --- /dev/null +++ b/firebase.json @@ -0,0 +1,17 @@ +{ + "hosting": { + "site": "calculator-me6msjmd", + "public": "dist", + "headers": [ + { + "source": "**", + "headers": [ + { + "key": "Content-Security-Policy", + "value": "default-src 'self';" + } + ] + } + ] + } +}