diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml index 5163803..1a54e54 100644 --- a/.github/workflows/firebase-hosting-merge.yml +++ b/.github/workflows/firebase-hosting-merge.yml @@ -2,7 +2,7 @@ # https://github.com/firebase/firebase-tools name: Deploy to Firebase Hosting on merge -'on': +on: push: branches: - master @@ -10,11 +10,11 @@ jobs: build_and_deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - run: yarn && yarn build - uses: FirebaseExtended/action-hosting-deploy@v0 with: - repoToken: '${{ secrets.GITHUB_TOKEN }}' - firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_BLUI_REACT_SHOWCASE }}' + repoToken: ${{ secrets.GITHUB_TOKEN }} + firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_BLUI_REACT_SHOWCASE }} channelId: live projectId: blui-react-showcase diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 32a3fbd..e2cfc36 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -2,17 +2,21 @@ # https://github.com/firebase/firebase-tools name: Deploy to Firebase Hosting on PR -'on': pull_request +on: pull_request +permissions: + checks: write + contents: read + pull-requests: write jobs: build_and_preview: - if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}' + if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - run: yarn && yarn build - uses: FirebaseExtended/action-hosting-deploy@v0 with: - repoToken: '${{ secrets.GITHUB_TOKEN }}' - firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_BLUI_REACT_SHOWCASE }}' + repoToken: ${{ secrets.GITHUB_TOKEN }} + firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_BLUI_REACT_SHOWCASE }} expires: 2d projectId: blui-react-showcase diff --git a/firebase.json b/firebase.json index 2112592..2c33c29 100644 --- a/firebase.json +++ b/firebase.json @@ -1,12 +1,16 @@ { - "hosting": { - "public": "dist", - "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], - "rewrites": [ - { - "source": "**", - "destination": "/index.html" - } - ] - } + "hosting": { + "public": "dist", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + } }