mirror of
https://github.com/actions/deploy-pages.git
synced 2026-02-11 04:41:26 +00:00
42 lines
952 B
YAML
42 lines
952 B
YAML
name: Check linter
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
# This allows a subsequently queued workflow run to interrupt previous runs
|
|
concurrency:
|
|
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v3
|
|
|
|
# check the node version from the .node-version file
|
|
- name: fetch node version
|
|
id: node-version
|
|
run: |
|
|
version=$(cat .node-version)
|
|
echo "version=${version}" >> $GITHUB_OUTPUT
|
|
|
|
- name: setup node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ steps.node-version.outputs.version }}
|
|
cache: npm
|
|
|
|
- name: install dependencies
|
|
run: npm ci
|
|
|
|
- name: verify linter
|
|
run: npm run lint:check
|