diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml index 909a6d1..67cf5b0 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: - main @@ -10,11 +10,12 @@ jobs: build_and_deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - run: npm install --force && npm run build + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v2 + - run: bun install && bun run build - uses: FirebaseExtended/action-hosting-deploy@v0 with: - repoToken: '${{ secrets.GITHUB_TOKEN }}' - firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_NETACAD_7098B }}' + repoToken: ${{ secrets.GITHUB_TOKEN }} + firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_NETACAD_7098B }} channelId: live projectId: netacad-7098b diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 61fdeed..9ba1598 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -2,16 +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 - - run: npm ci && npm run build + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v2 + - run: bun install && bun run build - uses: FirebaseExtended/action-hosting-deploy@v0 with: - repoToken: '${{ secrets.GITHUB_TOKEN }}' - firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_NETACAD_7098B }}' + repoToken: ${{ secrets.GITHUB_TOKEN }} + firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_NETACAD_7098B }} projectId: netacad-7098b