diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 7c24a2c..53f1153 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -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 @@ -61,4 +77,4 @@ jobs: repoToken: ${{ secrets.GITHUB_TOKEN }} firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_ARS_ANTIQUA }} projectId: ars-antiqua - channelId: "preview" \ No newline at end of file + channelId: "preview"