name: Build on: pull_request: branches: - main - develop jobs: build: runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v3 with: fetch-depth: 0 - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: '18.x' cache: 'npm' - name: Install dependencies run: npm ci - name: Format check run: npx nx affected --target=format --base=remotes/origin/${{ github.base_ref }} - name: Lint run: npx nx affected --target=lint --base=remotes/origin/${{ github.base_ref }} - name: Build run: npx nx affected --target=build --prod --base=remotes/origin/${{ github.base_ref }}