From 8b446be884acde4bc3f88d6bb121d9f61172d52b Mon Sep 17 00:00:00 2001 From: melissag-ensemble <120194874+melissag-ensemble@users.noreply.github.com> Date: Mon, 25 May 2026 13:10:04 -0700 Subject: [PATCH 1/4] Auto content update (2026-05-25 20:10:04) --- .github/workflows/algolia-indexing.yml | 51 ---------------- .../workflows/build-auto-generated-files.yml | 11 ++++ .github/workflows/deploy.yml | 30 ++++------ .github/workflows/lint.yml | 60 ++++++++++++++----- .github/workflows/post-lint-comment.yml | 32 ++++++++++ .../{resuse-deploy.yml => stage.yml} | 25 ++++---- .gitignore | 37 ++++-------- dev.mjs | 28 --------- package.json | 37 +++++++----- 9 files changed, 142 insertions(+), 169 deletions(-) delete mode 100644 .github/workflows/algolia-indexing.yml create mode 100644 .github/workflows/build-auto-generated-files.yml create mode 100644 .github/workflows/post-lint-comment.yml rename .github/workflows/{resuse-deploy.yml => stage.yml} (53%) delete mode 100644 dev.mjs diff --git a/.github/workflows/algolia-indexing.yml b/.github/workflows/algolia-indexing.yml deleted file mode 100644 index 173d58c7..00000000 --- a/.github/workflows/algolia-indexing.yml +++ /dev/null @@ -1,51 +0,0 @@ ---- -name: Search Indexing -on: - workflow_dispatch: - inputs: - mode: - description: 'Type of indexing. "index" to push to Algolia, "console" for dry run.' - required: true - default: "index" - type: choice - options: - - console - - index - -jobs: - build-and-index: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node v18 for Yarn v4 - uses: actions/setup-node@v3 - with: - node-version: "18.19.0" # Current LTS version - - - name: Enable Corepack for Yarn - run: corepack enable - - - name: Install Dependencies - run: yarn install - env: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - - - name: Build site - run: yarn build - - env: - NODE_OPTIONS: "--max_old_space_size=8192" - PREFIX_PATHS: true # equivalent to --prefix-paths flag for 'gatsby build' - REPO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - REPO_OWNER: ${{ github.repository_owner }} - REPO_NAME: ${{ github.event.repository.name }} - REPO_BRANCH: ${{ github.ref_name }} - GATSBY_ALGOLIA_APPLICATION_ID: ${{ secrets.AIO_ALGOLIA_APPLICATION_ID }} - GATSBY_ALGOLIA_SEARCH_API_KEY: ${{ secrets.AIO_ALGOLIA_SEARCH_API_KEY }} - ALGOLIA_WRITE_API_KEY: ${{ secrets.AIO_ALGOLIA_WRITE_API_KEY }} - ALGOLIA_INDEXATION_MODE: ${{ github.event.inputs.mode || 'index' }} - GATSBY_ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME || github.event.repository.name }} - GATSBY_FEDS_PRIVACY_ID: ${{ secrets.AIO_FEDS_PRIVACY_ID }} - GATSBY_SITE_DOMAIN_URL: https://developer.adobe.com diff --git a/.github/workflows/build-auto-generated-files.yml b/.github/workflows/build-auto-generated-files.yml new file mode 100644 index 00000000..3ee6368d --- /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 76dee46d..8181bc6b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,17 +1,19 @@ --- -name: Deployment +name: Production Deployment on: + push: + branches: + - main workflow_dispatch: inputs: env: description: "Select environment to deploy to" type: choice required: true - default: "stage" + default: "prod" options: - - stage - - prod - - stage & prod + - "prod" + - "stage & prod" baseSha: description: "Use base SHA commit to deploy from (empty string defaults to last commit before HEAD)" type: string @@ -24,16 +26,10 @@ 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 }} - baseSha: ${{ inputs.baseSha }} - deployAll: ${{ inputs.deployAll }} - lint: - name: Lint - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Lint - run: npx --yes github:AdobeDocs/adp-devsite-utils runLint -v + env: ${{ inputs.env || 'prod' }} + baseSha: ${{ inputs.baseSha || '' }} + deployAll: ${{ inputs.deployAll || false }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 18f1e49d..8c66a80e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,17 +1,45 @@ --- - name: Lint - on: - pull_request: - branches: [main] - paths: - - 'src/pages/**' - - jobs: - lint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Lint - run: npx --yes github:AdobeDocs/adp-devsite-utils runLint -v \ No newline at end of file +name: Lint +on: + pull_request: + branches: [main] + +jobs: + lint: + runs-on: ubuntu-latest + 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 + + - 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 00000000..d2c75fd1 --- /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/resuse-deploy.yml b/.github/workflows/stage.yml similarity index 53% rename from .github/workflows/resuse-deploy.yml rename to .github/workflows/stage.yml index 1bee8dc2..d108f501 100644 --- a/.github/workflows/resuse-deploy.yml +++ b/.github/workflows/stage.yml @@ -1,26 +1,23 @@ --- -name: Reuse Deployment +name: Staging on: workflow_dispatch: inputs: - env: - description: "Select environment to deploy to" - type: choice - required: true - default: "stage" - options: - - stage - - prod baseSha: description: "Use base SHA commit to deploy from (empty string defaults to last commit before HEAD)" type: string required: false default: "" - + deployAll: + description: "Force deploy all files" + type: boolean + default: false jobs: - reuse_deployment: - name: Reuse Deployment - uses: AdobeDocs/adp-devsite-workflow/.github/workflows/deploy.yml@main + deployment: + name: Deployment + uses: AdobeDocs/adp-devsite-workflow/.github/workflows/deploy-v2.yml@main + secrets: inherit with: - env: ${{ inputs.env }} + env: stage baseSha: ${{ inputs.baseSha }} + deployAll: ${{ inputs.deployAll }} diff --git a/.gitignore b/.gitignore index c2ed6184..4ee2f6f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,33 +1,16 @@ -.editorconfig -.idea -.DS_Store -.vscode/* -# npm yarn -node_modules -package.lock -yarn-error.log -.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 +# npm +node_modules +package-lock.json -# lerna -lerna-debug.log \ No newline at end of file +# generated by .github/workflows/lint.yml +linter-report.txt diff --git a/dev.mjs b/dev.mjs deleted file mode 100644 index 412e84de..00000000 --- a/dev.mjs +++ /dev/null @@ -1,28 +0,0 @@ -// content/docs -// serve static on 3001 - -import express from 'express'; -import fs from 'fs'; -import path from 'path'; -import { fileURLToPath } from 'url'; - -const __dirname = path.dirname(fileURLToPath(import.meta.url)); - -const PORT = process.env.DEV_PORT || 3003; - -// TODO: ensure `DOCS_DIRECTORY` starts with `/` -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()); - }, - }), -); - -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 5a625d4e..09f8ad8b 100644 --- a/package.json +++ b/package.json @@ -1,27 +1,32 @@ { - "private": true, - "name": "adobe-dev-distribution", + "name": "dev-docs-template", "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/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" + "engines": { + "node": "^24.11.0" }, - "packageManager": "yarn@3.2.1", - "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 64f640bd802153ee054b36e9b10c534a3fb1d8e0 Mon Sep 17 00:00:00 2001 From: melissag-ensemble <120194874+melissag-ensemble@users.noreply.github.com> Date: Mon, 25 May 2026 13:34:19 -0700 Subject: [PATCH 2/4] fix: preserve repo-specific fields in package.json --- package.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 09f8ad8b..15b11266 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,11 @@ { - "name": "dev-docs-template", + "private": true, + "name": "adobe-dev-distribution", "version": "1.0.0", "license": "Apache-2.0", "repository": { "type": "git", - "url": "https://github.com/AdobeDocs/dev-docs-template" + "url": "https://github.com/AdobeDocs/developer-distribute" }, "author": { "name": "Tim Kim", @@ -20,9 +21,9 @@ "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", "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", From 3e1c058cfe4b0667eff367cdc29f51076418642b Mon Sep 17 00:00:00 2001 From: melissag-ensemble <120194874+melissag-ensemble@users.noreply.github.com> Date: Wed, 27 May 2026 19:34:32 -0700 Subject: [PATCH 3/4] Auto content update (2026-05-28 02:34:32) --- .github/workflows/lint.yml | 8 ++++++-- package.json | 7 +++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8c66a80e..bec32fec 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 15b11266..09f8ad8b 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,10 @@ { - "private": true, - "name": "adobe-dev-distribution", + "name": "dev-docs-template", "version": "1.0.0", "license": "Apache-2.0", "repository": { "type": "git", - "url": "https://github.com/AdobeDocs/developer-distribute" + "url": "https://github.com/AdobeDocs/dev-docs-template" }, "author": { "name": "Tim Kim", @@ -21,9 +20,9 @@ "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", "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", From f36440f00c72fc3d9bd2da0155ed8adb2781b064 Mon Sep 17 00:00:00 2001 From: melissag-ensemble <120194874+melissag-ensemble@users.noreply.github.com> Date: Wed, 27 May 2026 19:56:26 -0700 Subject: [PATCH 4/4] fix: preserve repo-specific fields in package.json --- package.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 09f8ad8b..15b11266 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,11 @@ { - "name": "dev-docs-template", + "private": true, + "name": "adobe-dev-distribution", "version": "1.0.0", "license": "Apache-2.0", "repository": { "type": "git", - "url": "https://github.com/AdobeDocs/dev-docs-template" + "url": "https://github.com/AdobeDocs/developer-distribute" }, "author": { "name": "Tim Kim", @@ -20,9 +21,9 @@ "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", "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",