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';" + } + ] + } + ] + } +}