Skip to main content
github.deleteRepositoryFile deletes one file through GitHub’s Contents API.
automations/delete-github-file.automation.ts
Provide the repository, file path, current blob sha, and commitMessage. Optional branch defaults to the default branch; author and committer accept { name, email }. Returns commit.sha and content: null. Requires Contents write permission. GitHub rejects stale blob IDs and conflicting concurrent Contents API writes. This action rejects paths under .github/workflows/. Use github.deleteWorkflowFile for workflow files so Automate.ax requests GitHub’s additional Workflows write permission only when GitHub requires it.