diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 622a14f0..bec32fec 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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() @@ -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 diff --git a/.gitignore b/.gitignore index 09416613..4ee2f6f4 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/package.json b/package.json index 573cd870..846085ff 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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" } }