docs-v2/.github/workflows
Jason Stirnaman 0fbf9e5e9b
fix(ci): complete PR preview path offset and fork PR handling (#6667)
* fix(ci): add path offset for PR preview subdirectory baseURL

When PR preview builds use a subdirectory baseURL like
/docs-v2/pr-preview/pr-XXXX/, shortcodes that parse .RelPermalink
to detect product context fail because the path has extra segments.

This fix:
- Adds config/pr-preview/params.yml with prPreviewPathOffset: 3
- Updates workflow to use -e pr-preview environment
- Updates api-endpoint, influxdb/host, and children shortcodes to
  use the offset when indexing path segments
- Adds nil-safety with default fallback for placeholder_host

Normal builds are unaffected (offset defaults to 0).

* fix(ci): add path offset to product-name and sidebar for PR previews

Apply the same prPreviewPathOffset fix to product-name.html and
sidebar.html that was applied in the initial PR #6665.

These templates parse RelPermalink to detect product context, but when
baseURL includes a subdirectory path (e.g., /docs-v2/pr-preview/pr-XXXX/),
the path indices shift. This fix uses the configurable offset to skip
extra path segments in PR preview builds.

* fix(ci): skip PR preview for fork PRs and add notice comment

Fork PRs cannot deploy to gh-pages because GITHUB_TOKEN has read-only
access to the base repository. This is a GitHub security feature.

Changes:
- Add condition to skip preview job for fork PRs
- Add fork-notice job to post helpful comment explaining limitation
- Include local preview instructions for contributors
2025-12-22 15:30:26 -06:00
..
audit-documentation.yml chore(ci): Cleanup JS 2025-07-07 12:13:36 -05:00
cleanup-stale-previews.yml feat(ci): add PR preview system for GitHub Pages (#6636) 2025-12-18 13:44:14 -06:00
influxdb3-release.yml Updated all README files in the 2025-07-07 12:45:48 -05:00
pr-link-check.yml chore(ci): update link-checker to v1.2.5 (#6602) 2025-12-10 09:52:51 -06:00
pr-preview.yml fix(ci): complete PR preview path offset and fork PR handling (#6667) 2025-12-22 15:30:26 -06:00
prepare-release.yml Updated all README files in the 2025-07-07 12:45:48 -05:00
sync-link-checker-binary.yml docs(testing): document link-checker binary release process 2025-08-18 18:02:44 -05:00
sync-plugins.yml Disable screenshot generation for MVP 2025-11-17 13:30:01 -08:00
trigger-on-release.yml chore(ci): Audit documentation for changes to influxdb3 CLI. Configures a GitHub release workflow to generate release notes and run the audit documentation script. 2025-07-07 12:13:36 -05:00