Publishing Automation
This guide explains how to use the automated publish workflow in VS Code to commit, push, and create a Pull Request — all from a single command.
Prerequisites
- VS Code with the GitHub Copilot extension installed
- GitHub Pull Requests extension installed
- GitLens / GitKraken extension installed
- You are signed in to GitHub in VS Code
- The repo setting "Allow auto-merge" is enabled (Settings > General > Pull Requests in the GitHub repo)
How It Works
The publish workflow is defined in .github/copilot/publish-docs.prompt.md. When invoked, it instructs the Copilot agent to:
- Check which files have changed (
git status) - Stage all modified and new files
- Generate a commit message summarizing the changes
- Commit the changes
- Create a new branch with an incremented counter (e.g. if current branch is
ea-276, the new branch will beea-277) - Push the new branch to origin
- Create a Pull Request targeting
main - Enable auto-merge on the PR
Once the PR is created, the normal review and pipeline process takes over:
- Team members review and approve the PR
- The YAML pipeline runs checks/build
- When both reviews and checks pass, the PR merges automatically
- The merge to
maintriggers the deploy pipeline to Azure
How to Use
- Make your documentation changes as usual.
- Open the Chat panel in VS Code (Ctrl+Alt+I).
- Type
/publish-docsand press Enter. - The agent will show you the changes, generate a commit message, and ask for confirmation before pushing and creating the PR.
- Done — the PR is created and will auto-merge once approved.
Notes
- The agent will ask for confirmation before pushing and creating the PR. You can review the commit message and adjust if needed.
- You cannot bypass the required review — this is by design to maintain quality control.
- If auto-merge is not enabled on the repo, step 7 will be skipped and you will need to merge manually after approval.
- You can also run the prompt from the Command Palette: Chat: Run Prompt >
publish-docs.