ci: add link checker action (#1737) #526
This file contains 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: pull_request | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
if: github.ref != 'refs/heads/master' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v4 | |
with: | |
version: latest | |
run_install: true | |
- name: Test | |
run: pnpm test | |
next: | |
if: github.ref != 'refs/heads/master' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v4 | |
with: | |
version: latest | |
run_install: false | |
- name: Lint | |
run: | | |
pnpm install react react-dom next | |
./node_modules/.bin/next lint |