From a40db911f4346c77e65a85cb1d6d8afdf768f72c Mon Sep 17 00:00:00 2001 From: melissag-ensemble <120194874+melissag-ensemble@users.noreply.github.com> Date: Mon, 25 May 2026 13:13:02 -0700 Subject: [PATCH 1/6] Auto content update (2026-05-25 20:13:02) --- .../workflows/build-auto-generated-files.yml | 11 ++++ .github/workflows/deploy.yml | 6 ++- .github/workflows/lint.yml | 34 ++++++++++-- .github/workflows/post-lint-comment.yml | 32 ++++++++++++ .github/workflows/stage.yml | 3 +- .gitignore | 52 +++---------------- dev.mjs | 39 -------------- package.json | 41 ++++++++------- 8 files changed, 109 insertions(+), 109 deletions(-) create mode 100644 .github/workflows/build-auto-generated-files.yml create mode 100644 .github/workflows/post-lint-comment.yml delete mode 100644 dev.mjs diff --git a/.github/workflows/build-auto-generated-files.yml b/.github/workflows/build-auto-generated-files.yml new file mode 100644 index 0000000..3ee6368 --- /dev/null +++ b/.github/workflows/build-auto-generated-files.yml @@ -0,0 +1,11 @@ +--- +name: Build Auto-Generated Files +on: + workflow_dispatch: + +jobs: + build-contributors: + name: Build Auto-Generated Files + uses: AdobeDocs/adp-devsite-workflow/.github/workflows/build-auto-generated-files-v2.yml@main + secrets: inherit + \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ca7e651..8181bc6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,5 +1,5 @@ --- -name: Deployment +name: Production Deployment on: push: branches: @@ -26,7 +26,9 @@ on: jobs: deployment: name: Deployment - uses: AdobeDocs/adp-devsite-workflow/.github/workflows/deploy.yml@main + if: github.actor != 'adp-devsite-app[bot]' && github.repository != 'AdobeDocs/dev-docs-template' + uses: AdobeDocs/adp-devsite-workflow/.github/workflows/deploy-v2.yml@main + secrets: inherit with: env: ${{ inputs.env || 'prod' }} baseSha: ${{ inputs.baseSha || '' }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 863d6d2..8c66a80 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,15 +3,43 @@ name: Lint on: pull_request: branches: [main] - paths: - - 'src/pages/**' jobs: lint: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + 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 + + - name: Save PR number + if: always() + run: echo "${{ github.event.pull_request.number }}" > pr-number.txt + + - name: Upload linter report + if: always() + uses: actions/upload-artifact@v7 + with: + name: linter-report + path: | + linter-report.txt + pr-number.txt + if-no-files-found: ignore + + - name: Fail if linter found errors + if: steps.changes.outputs.changed == 'true' && steps.lint.outcome == 'failure' + run: exit 1 diff --git a/.github/workflows/post-lint-comment.yml b/.github/workflows/post-lint-comment.yml new file mode 100644 index 0000000..d2c75fd --- /dev/null +++ b/.github/workflows/post-lint-comment.yml @@ -0,0 +1,32 @@ +--- +name: Post Linter Report +on: + workflow_run: + workflows: ["Lint"] + types: + - completed + +permissions: + pull-requests: write + +jobs: + comment: + runs-on: ubuntu-latest + if: github.event.workflow_run.event == 'pull_request' + steps: + - name: Download linter report artifact + uses: actions/download-artifact@v8 + with: + name: linter-report + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Post Linter Report to PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_REPOSITORY: ${{ github.repository }} + LINTER_REPORT_PATH: ./linter-report.txt + PR_NUMBER_PATH: ./pr-number.txt + run: | + npm install --no-save github:AdobeDocs/adp-devsite-scripts + node node_modules/adp-devsite-scripts/linter-bot/postLinterReport.js diff --git a/.github/workflows/stage.yml b/.github/workflows/stage.yml index c96a42d..d108f50 100644 --- a/.github/workflows/stage.yml +++ b/.github/workflows/stage.yml @@ -15,7 +15,8 @@ on: jobs: deployment: name: Deployment - uses: AdobeDocs/adp-devsite-workflow/.github/workflows/deploy.yml@main + uses: AdobeDocs/adp-devsite-workflow/.github/workflows/deploy-v2.yml@main + secrets: inherit with: env: stage baseSha: ${{ inputs.baseSha }} diff --git a/.gitignore b/.gitignore index becd8c2..4ee2f6f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,52 +1,16 @@ -# OS and IDE generated files # -############################## +# OS .DS_Store -.vscode -.history -.idea -.editorconfig - -# npm yarn -node_modules -package-lock.json -yarn-error.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 - -# local actions -.actrc -.secrets -local-test.yml - -# yalc -.yalc -yalc.lock - -# json files -adp-site-metadata.json +# npm +node_modules +package-lock.json -#.txt +# generated by .github/workflows/lint.yml linter-report.txt diff --git a/dev.mjs b/dev.mjs deleted file mode 100644 index 84605fa..0000000 --- a/dev.mjs +++ /dev/null @@ -1,39 +0,0 @@ -// content/docs -// serve static on 3001 - -import express from 'express'; -import fs from 'fs'; -import path from 'path'; -import { fileURLToPath } from 'url'; -import { execSync } from 'child_process'; - -const __dirname = path.dirname(fileURLToPath(import.meta.url)); - -const PORT = process.env.DEV_PORT || 3003; - -const getCurrentBranch = () => { - try { - return execSync('git branch --show-current', { encoding: 'utf8' }).trim(); - } catch (error) { - console.warn('Could not determine git branch, defaulting to "main"'); - return 'main'; - } -}; - -const currentBranch = getCurrentBranch(); -const DOCS_DIRECTORY = process.env.DIRECTORY || './src/pages'; - -const app = express(); -console.log(path.resolve(__dirname, `./${DOCS_DIRECTORY}`)); -app.use( - express.static(path.resolve(__dirname, `./${DOCS_DIRECTORY}`), { - setHeaders: (res) => { - res.setHeader('last-modified', new Date().toGMTString()); - res.setHeader('local-branch-name', currentBranch); - }, - }), -); - -app.listen(PORT, () => { - console.debug(`Docs dev server is running on port ${PORT}`); -}); \ No newline at end of file diff --git a/package.json b/package.json index 84a803c..09f8ad8 100644 --- a/package.json +++ b/package.json @@ -1,31 +1,32 @@ { - "private": true, - "name": "stock-api-docs", + "name": "dev-docs-template", "version": "1.0.0", "license": "Apache-2.0", "repository": { "type": "git", - "url": "https://github.com/AdobeDocs/stock-api-docs" + "url": "https://github.com/AdobeDocs/dev-docs-template" }, "author": { - "name": "Stephan Ringel", - "url": "https://github.com/icaraps" + "name": "Tim Kim", + "url": "https://github.com/timkim" }, - "scripts": { - "dev": "node ./dev.mjs", - "buildNavigation": "npx --yes github:AdobeDocs/adp-devsite-utils buildNavigation -v", - "buildRedirections": "npx --yes github:AdobeDocs/adp-devsite-utils buildRedirections -v", - "renameFiles": "npx --yes github:AdobeDocs/adp-devsite-utils renameFiles -v", - "normalizeLinks": "npx --yes github:AdobeDocs/adp-devsite-utils normalizeLinks -v", - "buildSiteWideBanner": "npx --yes github:AdobeDocs/adp-devsite-utils buildSiteWideBanner -v", - "lint": "npx --yes github:AdobeDocs/adp-devsite-utils runLint -v", - "lint:errorOnly": "npx --yes github:AdobeDocs/adp-devsite-utils runLint", - "link:skipdeadlinks": "npx --yes github:AdobeDocs/adp-devsite-utils runLint --skip-dead-links -v", - "link:deadlinkonly": "npx --yes github:AdobeDocs/adp-devsite-utils runLint --dead-links-only -v", - "redirectCheck:stage": "npx --yes github:AdobeDocs/adp-devsite-utils redirectChecker stage --verbose", - "redirectCheck:prod": "npx --yes github:AdobeDocs/adp-devsite-utils redirectChecker prod --verbose" + "engines": { + "node": "^24.11.0" }, - "devDependencies": { - "express": "5.1.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", + "buildRedirections": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils buildRedirections -v", + "renameFiles": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils renameFiles -v", + "normalizeLinks": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils normalizeLinks -v", + "buildSiteWideBanner": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils buildSiteWideBanner -v", + "buildSiteMetadata": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils buildSiteMetadata -v", + "buildContributors": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils buildContributorsV2 -v", + "lint": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint -v", + "lint:errorOnly": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint", + "link:externalLinkOnly": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint --external-links-only -v", + "link:checkAllLinks": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint --internal-links-only --external-links-only -v", + "redirectCheck:stage": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils redirectChecker stage --verbose", + "redirectCheck:prod": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils redirectChecker prod --verbose" } } From 139fb2897bb3441935091dbba3650111c9a42b24 Mon Sep 17 00:00:00 2001 From: melissag-ensemble <120194874+melissag-ensemble@users.noreply.github.com> Date: Mon, 25 May 2026 13:35:18 -0700 Subject: [PATCH 2/6] fix: preserve repo-specific fields in package.json --- package.json | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 09f8ad8..f8fa62e 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,11 @@ { - "name": "dev-docs-template", + "private": true, + "name": "stock-api-docs", "version": "1.0.0", "license": "Apache-2.0", "repository": { "type": "git", - "url": "https://github.com/AdobeDocs/dev-docs-template" + "url": "https://github.com/AdobeDocs/stock-api-docs" }, "author": { "name": "Tim Kim", @@ -20,13 +21,15 @@ "renameFiles": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils renameFiles -v", "normalizeLinks": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils normalizeLinks -v", "buildSiteWideBanner": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils buildSiteWideBanner -v", - "buildSiteMetadata": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils buildSiteMetadata -v", - "buildContributors": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils buildContributorsV2 -v", "lint": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint -v", "lint:errorOnly": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint", - "link:externalLinkOnly": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint --external-links-only -v", - "link:checkAllLinks": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint --internal-links-only --external-links-only -v", + "link:skipdeadlinks": "npx --yes github:AdobeDocs/adp-devsite-utils runLint --skip-dead-links -v", + "link:deadlinkonly": "npx --yes github:AdobeDocs/adp-devsite-utils runLint --dead-links-only -v", "redirectCheck:stage": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils redirectChecker stage --verbose", - "redirectCheck:prod": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils redirectChecker prod --verbose" + "redirectCheck:prod": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils redirectChecker prod --verbose", + "buildSiteMetadata": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils buildSiteMetadata -v", + "buildContributors": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils buildContributorsV2 -v", + "link:externalLinkOnly": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint --external-links-only -v", + "link:checkAllLinks": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint --internal-links-only --external-links-only -v" } } From ea3bd41b21e3ed716a8b879bf1e6afbb69f19cd6 Mon Sep 17 00:00:00 2001 From: melissag-ensemble <120194874+melissag-ensemble@users.noreply.github.com> Date: Mon, 25 May 2026 13:35:21 -0700 Subject: [PATCH 3/6] fix: preserve external .gitignore entries --- .gitignore | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.gitignore b/.gitignore index 4ee2f6f..deb018f 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,25 @@ package-lock.json # generated by .github/workflows/lint.yml linter-report.txt + +# Preserved from external contributors +.history +.idea +.editorconfig +.pnp.* +.yarn/* +!.gitignore +!.yarn.lock +!.yarnrc.yml +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions +cypress/videos +cypress/screenshots +lerna-debug.log +.actrc +.secrets +local-test.yml +.yalc From ff11467ad1eecd2b5b47d80f8851d7a945de4714 Mon Sep 17 00:00:00 2001 From: melissag-ensemble <120194874+melissag-ensemble@users.noreply.github.com> Date: Mon, 25 May 2026 15:07:41 -0700 Subject: [PATCH 4/6] fix: drop over-preserved .gitignore block (dmitrymatio is internal team) --- .gitignore | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/.gitignore b/.gitignore index deb018f..4ee2f6f 100644 --- a/.gitignore +++ b/.gitignore @@ -14,25 +14,3 @@ package-lock.json # generated by .github/workflows/lint.yml linter-report.txt - -# Preserved from external contributors -.history -.idea -.editorconfig -.pnp.* -.yarn/* -!.gitignore -!.yarn.lock -!.yarnrc.yml -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/sdks -!.yarn/versions -cypress/videos -cypress/screenshots -lerna-debug.log -.actrc -.secrets -local-test.yml -.yalc From 89380a60edc8e768437feb9aeb5954177f031bd4 Mon Sep 17 00:00:00 2001 From: melissag-ensemble <120194874+melissag-ensemble@users.noreply.github.com> Date: Wed, 27 May 2026 19:37:03 -0700 Subject: [PATCH 5/6] Auto content update (2026-05-28 02:37:03) --- .github/workflows/lint.yml | 8 ++++++-- package.json | 17 +++++++---------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8c66a80..bec32fe 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,8 +15,10 @@ jobs: - name: Check for src/pages changes id: changes + env: + BASE_REF: ${{ github.base_ref }} run: | - git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q '^src/pages/' \ + git diff --name-only "origin/${BASE_REF}...HEAD" | grep -q '^src/pages/' \ && echo "changed=true" >> $GITHUB_OUTPUT \ || echo "changed=false" >> $GITHUB_OUTPUT @@ -28,7 +30,9 @@ jobs: - 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() diff --git a/package.json b/package.json index f8fa62e..09f8ad8 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,10 @@ { - "private": true, - "name": "stock-api-docs", + "name": "dev-docs-template", "version": "1.0.0", "license": "Apache-2.0", "repository": { "type": "git", - "url": "https://github.com/AdobeDocs/stock-api-docs" + "url": "https://github.com/AdobeDocs/dev-docs-template" }, "author": { "name": "Tim Kim", @@ -21,15 +20,13 @@ "renameFiles": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils renameFiles -v", "normalizeLinks": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils normalizeLinks -v", "buildSiteWideBanner": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils buildSiteWideBanner -v", - "lint": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint -v", - "lint:errorOnly": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint", - "link:skipdeadlinks": "npx --yes github:AdobeDocs/adp-devsite-utils runLint --skip-dead-links -v", - "link:deadlinkonly": "npx --yes github:AdobeDocs/adp-devsite-utils runLint --dead-links-only -v", - "redirectCheck:stage": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils redirectChecker stage --verbose", - "redirectCheck:prod": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils redirectChecker prod --verbose", "buildSiteMetadata": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils buildSiteMetadata -v", "buildContributors": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils buildContributorsV2 -v", + "lint": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint -v", + "lint:errorOnly": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint", "link:externalLinkOnly": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint --external-links-only -v", - "link:checkAllLinks": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint --internal-links-only --external-links-only -v" + "link:checkAllLinks": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint --internal-links-only --external-links-only -v", + "redirectCheck:stage": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils redirectChecker stage --verbose", + "redirectCheck:prod": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils redirectChecker prod --verbose" } } From d10088282d92fbb96a28e176cab2d9efc4abd838 Mon Sep 17 00:00:00 2001 From: melissag-ensemble <120194874+melissag-ensemble@users.noreply.github.com> Date: Wed, 27 May 2026 19:56:59 -0700 Subject: [PATCH 6/6] fix: preserve repo-specific fields in package.json --- package.json | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 09f8ad8..f8fa62e 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,11 @@ { - "name": "dev-docs-template", + "private": true, + "name": "stock-api-docs", "version": "1.0.0", "license": "Apache-2.0", "repository": { "type": "git", - "url": "https://github.com/AdobeDocs/dev-docs-template" + "url": "https://github.com/AdobeDocs/stock-api-docs" }, "author": { "name": "Tim Kim", @@ -20,13 +21,15 @@ "renameFiles": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils renameFiles -v", "normalizeLinks": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils normalizeLinks -v", "buildSiteWideBanner": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils buildSiteWideBanner -v", - "buildSiteMetadata": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils buildSiteMetadata -v", - "buildContributors": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils buildContributorsV2 -v", "lint": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint -v", "lint:errorOnly": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint", - "link:externalLinkOnly": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint --external-links-only -v", - "link:checkAllLinks": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint --internal-links-only --external-links-only -v", + "link:skipdeadlinks": "npx --yes github:AdobeDocs/adp-devsite-utils runLint --skip-dead-links -v", + "link:deadlinkonly": "npx --yes github:AdobeDocs/adp-devsite-utils runLint --dead-links-only -v", "redirectCheck:stage": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils redirectChecker stage --verbose", - "redirectCheck:prod": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils redirectChecker prod --verbose" + "redirectCheck:prod": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils redirectChecker prod --verbose", + "buildSiteMetadata": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils buildSiteMetadata -v", + "buildContributors": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils buildContributorsV2 -v", + "link:externalLinkOnly": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint --external-links-only -v", + "link:checkAllLinks": "npx --yes --prefer-online github:AdobeDocs/adp-devsite-utils runLint --internal-links-only --external-links-only -v" } }