Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,29 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Check for src/pages changes
id: changes
env:
BASE_REF: ${{ github.base_ref }}
run: |
git diff --name-only "origin/${BASE_REF}...HEAD" | grep -q '^src/pages/' \
&& echo "changed=true" >> $GITHUB_OUTPUT \
|| echo "changed=false" >> $GITHUB_OUTPUT

- name: Lint
id: lint
if: steps.changes.outputs.changed == 'true'
continue-on-error: true
run: npx --yes github:AdobeDocs/adp-devsite-utils runLint -v

- name: Save PR number
if: always()
run: echo "${{ github.event.pull_request.number }}" > pr-number.txt
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: echo "$PR_NUMBER" > pr-number.txt

- name: Upload linter report
if: always()
Expand All @@ -28,7 +42,8 @@ jobs:
path: |
linter-report.txt
pr-number.txt
if-no-files-found: ignore

- name: Fail if linter found errors
if: steps.lint.outcome == 'failure'
if: steps.changes.outputs.changed == 'true' && steps.lint.outcome == 'failure'
run: exit 1
47 changes: 8 additions & 39 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,47 +1,16 @@
# .gitignore

.editorconfig
.idea
# OS
.DS_Store
.vscode/*

# npm yarn
node_modules
package-lock.json
yarn-error.log
.cursor-symlink-impl.log
.pnp.*
.yarn/*

# keep in repo
!.gitignore
!.yarn.lock
!.yarnrc.yml
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
# IDE
.vscode

# gatsby files
# environment variables
.env
.cache
public

# cypress
cypress/videos
cypress/screenshots

# lerna
lerna-debug.log
# npm
node_modules
package-lock.json

# Added by update-bot
.vscode
.history
.actrc
.secrets
local-test.yml
.yalc
yalc.lock
linter-output.txt
# generated by .github/workflows/lint.yml
linter-report.txt
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
{
"name": "dev-site-documentation-template",
"name": "ff-services-docs",
"version": "1.0.0",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/AdobeDocs/dev-site-documentation-template"
"url": "https://github.com/AdobeDocs/ff-services-docs"
},
"author": {
"name": "Tim Kim",
"url": "https://github.com/timkim"
},
"engines": {
"node": "^24.11.0"
},
"scripts": {
"dev": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils dev",
"buildNavigation": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils buildNavigation -v",
Expand All @@ -27,8 +30,5 @@
"redirectCheck:prod": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils redirectChecker prod --verbose",
"lint:openapi": "npx --yes @redocly/cli@latest lint",
"lint:openapi:all": "sh -c 'if find static -name \"*.json\" -print -quit 2>/dev/null | grep -q .; then npx --yes @redocly/cli@latest lint static/; else echo \"No OpenAPI JSON files under static/\"; fi'"
},
"engines": {
"node": "^24.11.0"
}
}