name: Lint and build on: # Trigger the workflow on push or pull request, # but only for the main branch push: branches: - main - master pull_request: jobs: linting: name: Linting runs-on: ubuntu-latest steps: - name: Check out Git repository uses: actions/checkout@v2 - name: Set up Node.js uses: actions/setup-node@v1 with: node-version: 18 - name: Install dependencies run: npm ci - name: Lint run: npm run lint - name: Build run: npm run build