Skip to content

Commit

Permalink
Merge pull request #62 from 21CSM/47-deploy-preview-subset
Browse files Browse the repository at this point in the history
ci(firebase): modify workflow so that preview only deploys on src
  • Loading branch information
21CSM authored Oct 2, 2024
2 parents 7e2312f + 0cb5aab commit 186bc8c
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,25 @@ jobs:
name: build
path: build

changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
src: ${{ steps.filter.outputs.src }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
src:
- 'src/**'
deploy-preview:
needs: build
needs: [build, changes]
runs-on: ubuntu-latest
if: ${{ needs.changes.outputs.src == 'true' }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -61,4 +77,4 @@ jobs:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_ARS_ANTIQUA }}
projectId: ars-antiqua
channelId: "preview"
channelId: "preview"

0 comments on commit 186bc8c

Please sign in to comment.