Refactor CI workflow and improve code quality #2
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: CI for Next.js App | |
on: | |
push: | |
branches: | |
- main | |
- staging:dev-patch-main | |
pull_request: | |
jobs: | |
ci: | |
name: Continuous Integration | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run Linter | |
run: npm run lint | |
- name: Build Application | |
run: npm run build |