Skip to content

Update deploy workflow to only run if linter and formatter checks suc… #1

Update deploy workflow to only run if linter and formatter checks suc…

Update deploy workflow to only run if linter and formatter checks suc… #1

name: CI/CD - Run lint and formatting checkout
on:
push:

Check failure on line 4 in .github/workflows/lint-and-format.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/lint-and-format.yaml

Invalid workflow file

You have an error in your yaml syntax on line 4
branches:
- main
pull-request:
types:
- opened
jobs:
deploy:
runs-on: [self-hosted]
timeout-minutes: 10
env:
SITE_ROOT: /var/www/html/project1
npm_config_cache: ${{ github.workspace }}/.npm-cache
TMPDIR: ${{ github.workspace }}/.tmp
steps:
- name: Check out source
uses: actions/checkout@v4
- name: Install dependencies
working-directory: vær
run: |
mkdir -p "$TMPDIR"
npm ci --no-audit --no-fund
- name: Run Prettier check
working-directory: vær
run: npx exec prettier . --check
- name: Run ESLint
working-directory: vær
run: npm run lint