From e7bee44345bfd4400530e17ef96ea59372ad5602 Mon Sep 17 00:00:00 2001 From: ezpzlmnsqz1337 Date: Sun, 28 Aug 2022 20:52:31 +0200 Subject: [PATCH] feat(deploy): add automatic deploy to firebase hosting --- .firebaserc | 5 +++++ .github/workflows/github-ci.yml | 14 ++++++++++++++ firebase.json | 16 ++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 .firebaserc create mode 100644 firebase.json diff --git a/.firebaserc b/.firebaserc new file mode 100644 index 0000000..2c86218 --- /dev/null +++ b/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "big-robot-arm-ui" + } +} diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index 2b04062..f38bff7 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -51,3 +51,17 @@ jobs: name: coverage-reports path: coverage - run: echo "🍏 This job's status is ${{ job.status }}." + + deploy: + runs-on: ubuntu-latest + needs: [build, test-unit] + steps: + - run: | + npm ci + npm run build + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_BIG_ROBOT_ARM_UI }}' + channelId: live + projectId: big-robot-arm-ui diff --git a/firebase.json b/firebase.json new file mode 100644 index 0000000..2c33c29 --- /dev/null +++ b/firebase.json @@ -0,0 +1,16 @@ +{ + "hosting": { + "public": "dist", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + } +}