GitHub Deploy Skill
This skill provides a reusable PowerShell script for Windows to automate:
- Git checks
- Commit creation
- Push to remote branch
- Optional GitHub repository creation (via GitHub CLI)
- Optional deployment hints (for Streamlit flow)
Included file
github-deploy-skill.ps1
Parameters
-CommitMessage(required): commit message text-Repo(optional): GitHub repository inowner/repoformat-Branch(optional): target branch, defaultmain-CreateRepo(optional switch): create repo withghif missing-SkipDeployHint(optional switch): do not print deployment hint
Usage
From any Git project folder:
powershell -ExecutionPolicy Bypass -File .\github-deploy-skill.ps1 -CommitMessage "feat: update" -Repo "owner/repo" -Branch "main"
Create repository automatically:
powershell -ExecutionPolicy Bypass -File .\github-deploy-skill.ps1 -CommitMessage "init" -Repo "owner/new-repo" -CreateRepo
Expected output
- Success: commit and push completed
- Failure: explicit error with reason (missing command, auth, push/network, remote config)
Requirements
- Git installed and available in PATH
- Network access to remote Git host
- If
-CreateRepois used: GitHub CLI (gh) installed and authenticated
Notes
- Works with repositories that do not yet have a first commit.
- If
origindoes not exist, pass-Repoand the script will add it automatically.