Skip to content

Commit 4fe3d55

Browse files
naman485NamanclaudeBhautikChudasama
authored
feat: add createos deploy command (#20)
* ci: auto-update Homebrew formula on new releases Adds an `update-homebrew` job to the release workflow that: - Downloads SHA256 checksums from the just-published release - Generates an updated Formula/createos.rb with new version + hashes - Pushes to NodeOps-app/homebrew-createos Requires HOMEBREW_TAP_TOKEN secret (PAT with repo scope for the tap repo). Runs after binaries are uploaded, so SHA256 files are always available. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat: add `createos deploy` command Adds the most-requested missing command — `createos deploy` — which creates new deployments directly from the CLI. Automatically detects project type and routes accordingly: - VCS (GitHub) projects → triggers deploy from latest commit on branch - Upload projects → zips local directory and uploads (respects .gitignore-style patterns) - Image projects → deploys a Docker image reference Features: - Auto-detects project from .createos.json (or --project flag) - Real-time deployment status polling with spinner - Prints live URL on success - Shows build-log hint on failure - Upload path: excludes node_modules, .git, .env, __pycache__, etc. - Upload path: 50MB max, 10MB per-file limit - 5-minute deployment timeout with graceful fallback New API methods: - TriggerLatestDeployment — POST /v1/projects/{id}/deployments/trigger-latest - UploadDeploymentZip — POST /v1/projects/{id}/deployments/upload/zip - GetDeployment — GET /v1/projects/{id}/deployments/{id} Closes #3 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update release.yaml * feat: addressed suggested changes * feat: addressed suggested changes --------- Co-authored-by: Naman <naman307@Namans-MacBook-Pro.local> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Bhautik <bhautikrchudasama@gmail.com>
1 parent c9d6404 commit 4fe3d55

7 files changed

Lines changed: 559 additions & 20 deletions

File tree

.github/workflows/release.yaml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ jobs:
6868
GH_TOKEN: ${{ github.token }}
6969
steps:
7070
- uses: actions/checkout@v4
71+
with:
72+
repository: NodeOps-app/homebrew-tap
73+
token: ${{ secrets.TAP_GITHUB_TOKEN }}
7174

7275
- uses: actions/download-artifact@v4
7376
with:
@@ -77,16 +80,7 @@ jobs:
7780
- name: Upload release assets
7881
run: gh release upload "${{ github.ref_name }}" createos-* --clobber
7982

80-
update-tap:
81-
needs: release
82-
runs-on: ubuntu-latest
83-
steps:
84-
- uses: actions/checkout@v4
85-
with:
86-
repository: NodeOps-app/homebrew-tap
87-
token: ${{ secrets.TAP_GITHUB_TOKEN }}
88-
89-
- name: Update formula
83+
- name: Update homebrew formula
9084
run: |
9185
VERSION="${{ github.ref_name }}"
9286
VERSION_NUM="${VERSION#v}"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.claude
22
.createos.json
33
.env.*
4+
cos
5+
build.sh

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,33 @@ createos --help
129129
| `createos projects get` | Get project details |
130130
| `createos projects delete` | Delete a project |
131131

132+
### Deploy
133+
134+
| Command | Description |
135+
| ----------------------- | -------------------------------------------------------- |
136+
| `createos deploy` | Deploy your project (auto-detects type) |
137+
138+
**Deploy flags:**
139+
140+
| Flag | Description |
141+
| ------------ | ------------------------------------------------------------------ |
142+
| `--project` | Project ID (auto-detected from `.createos.json`) |
143+
| `--branch` | Branch to deploy from (VCS/GitHub projects only) |
144+
| `--image` | Docker image to deploy (image projects only, e.g. `nginx:latest`) |
145+
| `--dir` | Directory to zip and upload (upload projects only, default: `.`) |
146+
147+
**Deploy behaviour by project type:**
148+
149+
| Project type | What happens |
150+
| -------------- | ------------------------------------------------------------------------------------- |
151+
| VCS / GitHub | Triggers from the latest commit. Prompts for branch interactively if not provided. |
152+
| Upload | Zips the local directory (respects `.gitignore`), uploads, and streams build logs. |
153+
| Image | Deploys the specified Docker image. |
154+
155+
**Files excluded from upload zip:**
156+
157+
Sensitive and noisy files are always excluded: `.env`, `.env.*`, secrets/keys (`*.pem`, `*.key`, `*.p12`, etc.), `node_modules`, build artifacts (`target`, `coverage`, etc.), OS/editor files, and anything listed in your project's `.gitignore`.
158+
132159
### Deployments
133160

134161
| Command | Description |
@@ -253,6 +280,12 @@ createos --help
253280
All commands accept flags so they work in CI and non-interactive environments. Destructive commands require `--force` to skip the confirmation prompt.
254281

255282
```bash
283+
# Deploy
284+
createos deploy # upload project — zips current dir
285+
createos deploy --dir ./dist # upload project — zip a specific dir
286+
createos deploy --branch main # VCS project — deploy from main
287+
createos deploy --image nginx:latest # image project
288+
256289
# Projects
257290
createos projects get --project <id>
258291
createos projects delete --project <id> --force

0 commit comments

Comments
 (0)