Staging to Production #9
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: PR CI | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - ready_for_review | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: pr-ci-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| validate: | |
| if: ${{ !github.event.pull_request.draft }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| env: | |
| NEXT_TELEMETRY_DISABLED: 1 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Set up Node.js | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: yarn | |
| cache-dependency-path: yarn.lock | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Lint JS/TS | |
| run: yarn lint | |
| - name: Lint CSS | |
| run: yarn lint:css | |
| - name: Run tests | |
| run: yarn test --ci --watch=false | |
| - name: Build | |
| run: yarn build |