Skip to content

Deployment

Deployment #3

name: Lint scraper and run prettier check
on:
pull_request:
branches: ["main"]
paths:
- "scraper/**"
workflow_dispatch:
defaults:
run:
working-directory: "scraper"
env:
NODE_VERSION: 18
PACKAGE_LOCK: scraper/package-lock.json
jobs:
lint:
name: Lint with eslint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
cache-dependency-path: ${{ env.PACKAGE_LOCK }}
- name: Clean install dependencies
run: npm ci
- name: Lint
run: npm run lint
prettier-check:
name: Prettier check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
cache-dependency-path: ${{ env.PACKAGE_LOCK }}
- name: Clean install dependencies
run: npm ci
- name: Run prettier check
run: npm run prettier-check