generated from AdobeDocs/dev-site-documentation-template
-
Notifications
You must be signed in to change notification settings - Fork 17
36 lines (32 loc) · 975 Bytes
/
lint.yml
File metadata and controls
36 lines (32 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
name: Lint
on:
pull_request:
branches: [main]
paths:
- 'src/pages/**'
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint
id: lint
continue-on-error: true
run: npx --yes github:AdobeDocs/adp-devsite-utils runLint -v
- name: Post Linter Report to PR
if: always()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_ID: ${{ github.event.pull_request.number }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: |
npm install --no-save github:AdobeDocs/adp-devsite-scripts
node node_modules/adp-devsite-scripts/linter-bot/postLinterReport.js
- name: Fail if linter found errors
if: steps.lint.outcome == 'failure'
run: exit 1