Skip to content

feat: add dry run option to documentation publishing workflows and ne…#75

Merged
homotechsual merged 2 commits into
mainfrom
develop
Apr 27, 2026
Merged

feat: add dry run option to documentation publishing workflows and ne…#75
homotechsual merged 2 commits into
mainfrom
develop

Conversation

@homotechsual

Copy link
Copy Markdown
Owner

…w task for building documentation

…w task for building documentation

Co-authored-by: Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings April 27, 2026 22:33
@homotechsual homotechsual merged commit 8b2511c into main Apr 27, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a “dry run” mode to the documentation publishing GitHub Actions workflows and introduces a new VS Code task to build + generate docs locally.

Changes:

  • Add workflow_dispatch + dry_run input to docs-sync workflow and gate git push on dry-run.
  • Add dry_run input to docs publishing workflow and gate git push on dry-run.
  • Add a new VS Code task to run build + doc generation tasks in one command.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
.vscode/tasks.json Adds a task to run build,updateHelp,publishDocs via DevOps/Build/build.ps1.
.github/workflows/sync-development-docs.yml Enables manual dispatch with dry_run and skips the final push when enabled.
.github/workflows/publish-docs.yml Adds dry_run input and skips the final push when enabled.

Comment on lines +98 to +102
if ('${{ inputs.dry_run }}' -eq 'true') {
Write-Host 'Dry run: skipping git push.' -ForegroundColor Yellow
} else {
git push origin "HEAD:$targetBranch"
}

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dry_run currently only skips the final git push, but this job still performs a git push --dry-run permission check earlier in the script. That means “dry run” will still fail unless DOCS_REPO_TOKEN has push rights, which undermines the intent of a test mode. Consider bypassing the push permission check (and any other push-only prerequisites) when inputs.dry_run is true, or clearly rename/reword the option to indicate it only skips the actual push.

Copilot uses AI. Check for mistakes.
Comment on lines 11 to +35
@@ -20,14 +27,17 @@ jobs:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
if: >-
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'push' &&
github.event.workflow_run.head_branch == 'develop'
github.event_name == 'workflow_dispatch' ||
(
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'push' &&
github.event.workflow_run.head_branch == 'develop'
)

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allowing workflow_dispatch means this workflow can be run from any ref selected in the UI, but the workflow always commits with the message “Sync … from develop” and doesn’t validate that the checked-out ref is actually develop. To avoid accidentally syncing docs from a feature branch (or producing misleading commit history), consider restricting manual runs to develop (e.g., branch check in the job if: or in-script validation) or updating the commit message to reflect the actual source ref/SHA.

Copilot uses AI. Check for mistakes.
Comment on lines +182 to +186
if ('${{ inputs.dry_run }}' -eq 'true') {
Write-Host 'Dry run: skipping git push.' -ForegroundColor Yellow
} else {
git push origin "HEAD:$targetBranch"
}

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dry_run only skips the final git push, but the script still executes a git push --dry-run permission check earlier. As a result, “dry run” will still fail unless DOCS_REPO_TOKEN can push to the docs repo, which limits its usefulness for test runs. Consider skipping the push permission check when inputs.dry_run is true, or adjust the input description to clarify that push permissions are still required.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants