Repository navigation
Refine deploy condition in GitHub Actions workflow #31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: JS Client | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - dev | |
| - master | |
| permissions: | |
| contents: read | |
| jobs: | |
| changes: | |
| name: Changes | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| outputs: | |
| javascript: ${{ steps.filter.outputs.javascript }} | |
| steps: | |
| - name: Checkout for push comparison | |
| if: github.event_name != 'pull_request' | |
| uses: actions/checkout@v4 | |
| - name: Detect changed files | |
| id: filter | |
| uses: dorny/paths-filter@v3 | |
| with: | |
| base: ${{ github.ref }} | |
| filters: | | |
| javascript: | |
| - 'src/client/CodeBeam.UltimateAuth.Client.Blazor/TScripts/**' | |
| - 'tests/CodeBeam.UltimateAuth.Tests.Unit/javascript/**' | |
| - '.github/workflows/javascript-tests.yml' | |
| tests: | |
| name: Tests | |
| needs: changes | |
| if: needs.changes.outputs.javascript == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Run JavaScript tests | |
| run: node --test tests/CodeBeam.UltimateAuth.Tests.Unit/javascript/*.test.cjs |