Publish code to GitHub
On every plan, you can propose the files of a finished build you can download in a pull request.
Connect a repository
A workspace owner or admin connects GitHub in Settings → Repositories. Install the GitHub App on selected repositories. It requests access to metadata and write permissions for contents, pull requests and workflows when installed. For an installation on a shared GitHub account, it also reads membership to verify the person administering it. Each link can list up to 10,000 repositories. Each publication gets a one-hour token for one repository. Accept new permissions in GitHub if your installation needs them.
Alternatively, connect with OAuth. This token reaches every repository you can write to within the selected scope. Choose public repositories or public and private repositories, and allow workflow changes if needed.
Review the pull request
Open the finished build, choose Publish to GitHub, then choose a connection, repository and directory for the application's first publication. Leave the directory empty for the repository root. Later previews use the linked repository and directory. A workspace owner or admin can use Change linked destination to update the link. Previous branches and pull requests stay at their original destinations. Review the archive checksum, build version, seal when present, file changes, write calls and limits before confirming. A publication accepts up to 256 MiB of ZIP data, 512 MiB expanded, 100 MiB per file or encoded Git request, 10,000 ZIP entries, 1,024 UTF-8 bytes per destination path and 70 planned GitHub content-creation calls. GitHub can also apply its own rate limits.
With the GitHub App, publishing to an empty repository creates the default branch with a minimal README.md before opening the pull request. If you connected with OAuth, connect the GitHub App or make the first commit in GitHub. If another writer creates that branch first, review the destination again.
Creating the branch may run the repository’s existing workflows with its secrets before review. Confirm each change to an existing workflow. In a public repository, confirm separately that the code, specification and verification will become public.
Only files from the previous publication merged into this base are eligible for removal. Decide what to do with a hand-edited file before reviewing again. An unsealed build is identified by its archive SHA-256. Manual edits break the match with a sealed build.
Use an MCP connection
Enable Publish code to GitHub for your connection in MCP Connections. It needs the build.repository.publish scope and your role’s permission. Use list_repository_destinations to choose a link and repository and preview_repository_publication to review. Confirm only after reading the preview. The tool publish_build_to_repository uses the reviewed digest and your decisions.
Resume or disconnect
If publication pauses after creating a branch, review again to resume the same pull request. If GitHub has yet to confirm branch or pull request creation, use Check publication status. If the approved base changes or a commit may have been created without a branch, review the recovery notice and both branch names. You can explicitly approve a replacement. The earlier attempt and any branch it created stay in place. A closed unmerged pull request offers Publish again on a fresh branch. Disconnecting or deleting the workspace removes DevMatrix access. Commits, branches, pull requests and the App installation remain on GitHub. During an OAuth revocation retry, DevMatrix blocks use of the credential immediately. You can also revoke access in GitHub.