Files
teleport/.github/scripts
mica 27e22b17e8 docs: update amplify previews to render all changed .mdx files (#66855)
* docs: update amplify previews to render all changed .mdx files

* testing multiple preview amplify links

* extract docs preview link logic into testable scripts

* small mdx test change

* reversing change used for testing purposes

* ci: run docs preview-link tests in Lint (Docs); fix section index URLs

Fold the preview-link script unit tests into doc-tests.yaml instead of
a standalone workflow: add .github/scripts/** to the  filter
and run TAP version 13
# Subtest: pageUrl: a normal nested page
ok 1 - pageUrl: a normal nested page
  ---
  duration_ms: 0.860125
  ...
# Subtest: pageUrl: top-level index maps to /docs/
ok 2 - pageUrl: top-level index maps to /docs/
  ---
  duration_ms: 0.12875
  ...
# Subtest: pageUrl: nested index maps to its parent directory
ok 3 - pageUrl: nested index maps to its parent directory
  ---
  duration_ms: 0.03725
  ...
# Subtest: pageUrl: deeply nested page
ok 4 - pageUrl: deeply nested page
  ---
  duration_ms: 0.097666
  ...
# Subtest: pageUrl: section index page (dir/dir.mdx) maps to the directory URL
ok 5 - pageUrl: section index page (dir/dir.mdx) maps to the directory URL
  ---
  duration_ms: 0.038083
  ...
# Subtest: pageUrl: nested section index page maps to its directory URL
ok 6 - pageUrl: nested section index page maps to its directory URL
  ---
  duration_ms: 0.03125
  ...
# Subtest: pageUrl: a normal page is not mistaken for a section index
ok 7 - pageUrl: a normal page is not mistaken for a section index
  ---
  duration_ms: 0.031458
  ...
# Subtest: getChangedPaths: drops removed files, keeps the rest
ok 8 - getChangedPaths: drops removed files, keeps the rest
  ---
  duration_ms: 0.31375
  ...
# Subtest: categorizeChangedPaths: separates pages from images, excludes includes and non-images
ok 9 - categorizeChangedPaths: separates pages from images, excludes includes and non-images
  ---
  duration_ms: 0.232084
  ...
# Subtest: categorizeChangedPaths: image extension match is case-insensitive
ok 10 - categorizeChangedPaths: image extension match is case-insensitive
  ---
  duration_ms: 0.055459
  ...
# Subtest: matchedImagesInContent: returns only images referenced in the content
ok 11 - matchedImagesInContent: returns only images referenced in the content
  ---
  duration_ms: 0.055541
  ...
# Subtest: matchedImagesInContent: empty when nothing matches
ok 12 - matchedImagesInContent: empty when nothing matches
  ---
  duration_ms: 0.034875
  ...
# Subtest: computeOrphanedImages: returns sorted images not referenced anywhere
ok 13 - computeOrphanedImages: returns sorted images not referenced anywhere
  ---
  duration_ms: 0.050667
  ...
# Subtest: buildAllPagePaths: merges, de-duplicates, and sorts
ok 14 - buildAllPagePaths: merges, de-duplicates, and sorts
  ---
  duration_ms: 0.046333
  ...
# Subtest: buildPageEntries: plain page with no image annotation
ok 15 - buildPageEntries: plain page with no image annotation
  ---
  duration_ms: 0.065334
  ...
# Subtest: buildPageEntries: single image change annotation
ok 16 - buildPageEntries: single image change annotation
  ---
  duration_ms: 0.04525
  ...
# Subtest: buildPageEntries: multiple image changes are sorted and pluralized
ok 17 - buildPageEntries: multiple image changes are sorted and pluralized
  ---
  duration_ms: 0.101917
  ...
# Subtest: composeLinksSection: wraps entries in markers and header
ok 18 - composeLinksSection: wraps entries in markers and header
  ---
  duration_ms: 0.421375
  ...
# Subtest: composeLinksSection: empty page list shows the "no pages" message
ok 19 - composeLinksSection: empty page list shows the "no pages" message
  ---
  duration_ms: 0.03575
  ...
# Subtest: composeLinksSection: includes an orphaned-images subsection when present
ok 20 - composeLinksSection: includes an orphaned-images subsection when present
  ---
  duration_ms: 0.098417
  ...
# Subtest: upsertLinksSection: appends after a separator when no section exists
ok 21 - upsertLinksSection: appends after a separator when no section exists
  ---
  duration_ms: 0.068666
  ...
# Subtest: upsertLinksSection: replaces an existing section in place (no duplication)
ok 22 - upsertLinksSection: replaces an existing section in place (no duplication)
  ---
  duration_ms: 0.076125
  ...
# Subtest: listMdxPages: finds .mdx files recursively and skips "includes" dirs
ok 23 - listMdxPages: finds .mdx files recursively and skips "includes" dirs
  ---
  duration_ms: 8.361333
  ...
1..23
# tests 23
# suites 0
# pass 23
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 150.474958 as a step in the doc-tests job, so the tests gate
merges via the existing required Lint (Docs) check.

Fix pageUrl for section index pages: foo/bar/bar.mdx renders at
/docs/foo/bar/, not /docs/foo/bar/bar/. Add tests for section index
pages and remove docs-preview-scripts-tests.yaml.

* testing changes to view workflow results

* reversing changes used for preview test

* isolate Amplify preview credentials from PR-controlled script. Split docs-amplify.yaml into two jobs so PR-controlled code never runs with AWS credentials.

* link pages affected by changed partials in preview workflow

* recognize parameterized partial includes in preview workflow

* normalize absolute include paths in partial graph

* normalize doubled slashes in include paths

* Pinned both actions/checkout (→ df4cb1c / v6.0.3) and actions/github-script (→ 3a2844b / v9.0.0) to their latest release SHAs

* reverting minor text change used for testing

* Update troubleshooting page content formatting

Reformat text to match master version.

* pulling troubleshooting page from master

* post-feedback Zac: Replace the in-script pulls.listFiles call with the dorny/paths-filter
action already used across the repo, passing its docs_files output to the script via CHANGED_FILES

* ci: run docs preview-link unit tests in Lint (Docs). Add .github/scripts/** to the changed filter and a node --test step to the doc-tests job so the preview-link script tests run as part of the
required Lint (Docs) check. Uses Node's built-in test runner, so no dependencies are added

* post-feedback from Codex/Taras: derive preview host from Amplify comment, not raw branch name

* Resolve docs-amplify.yaml conflict: keep per-job permissions

* Isolate preview-link script tests from credentialed job - addresses Codex P1 review feedback on PR #66855

* GitHub rejects issue-comment bodies over 65,536 characters, so a docs
sweep touching hundreds of pages would make the preview-link comment
update fail and break the workflow. Cap the section at 50 page links
and 20 entries per orphan list, within an overall 55,000-character
budget, and summarize the remainder
2026-07-15 12:20:42 +00:00
..