diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 44d6c6b7..8c66a80e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,8 +3,6 @@ name: Lint on: pull_request: branches: [main] - paths: - - 'src/pages/**' jobs: lint: @@ -12,9 +10,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: Check for src/pages changes + id: changes + run: | + git diff --name-only origin/${{ github.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 @@ -30,7 +38,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 diff --git a/.gitignore b/.gitignore index bf1f02c7..4ee2f6f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,50 +1,16 @@ -# OS and IDE generated files # -############################## -.DS_Store -.vscode -.history -.idea -.editorconfig -# npm yarn -node_modules -package-lock.json -yarn-error.log -yarn.lock -.pnp.* -.yarn/* +# OS +.DS_Store -# 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 - -# local actions -.actrc -.secrets -local-test.yml - -# yalc -.yalc -yalc.lock +# npm +node_modules +package-lock.json -# txt -linter-output.txt +# generated by .github/workflows/lint.yml linter-report.txt diff --git a/package.json b/package.json index 330066dc..d677a22e 100644 --- a/package.json +++ b/package.json @@ -14,16 +14,6 @@ "engines": { "node": "^24.11.0" }, - "dependencies": { - "@adobe/gatsby-theme-aio": "^4.14.18", - "gatsby": "4.22.0", - "react": "^17.0.2", - "react-dom": "^17.0.2" - }, - "resolutions": { - "sharp": "0.33.0", - "gatsby-sharp": "1.12.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",