From 356174f4af30a13e813c14024fd2a7064f99621c Mon Sep 17 00:00:00 2001 From: developomp Date: Sun, 16 May 2021 16:31:41 +0900 Subject: [PATCH] auto build & deploy to firebase --- .github/workflows/firebase-hosting-merge.yml | 20 ++++++++++++++ firebase.json | 28 +++++++++++--------- 2 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/firebase-hosting-merge.yml diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml new file mode 100644 index 0000000..510755f --- /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: + - dev +jobs: + build_and_deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: cd source && yarn install && yarn build + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: "${{ secrets.GITHUB_TOKEN }}" + firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_DEVELOPOMP_SITE }}" + channelId: live + projectId: developomp-site diff --git a/firebase.json b/firebase.json index c665399..d149483 100644 --- a/firebase.json +++ b/firebase.json @@ -1,14 +1,18 @@ { - "hosting": { - "target": "dev", - "cleanUrls": true, - "public": "source/build", - "rewrites": [ - { - "source": "**", - "destination": "/index.html" - } - ], - "ignore": ["firebase.json", "**/.*", "**/node_modules/**"] - } + "hosting": { + "target": "dev", + "cleanUrls": true, + "public": "source/build", + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ], + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ] + } }