mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-31 22:14:25 +01:00
setup-deploy: say which deploy fields count as confirmed, how to resolve the default branch, and group the detection tests
Periodic census 37176837432: the setup-deploy workflow judge's actionability mean was 3.67 (4, 4, 3). The low sample named the Fly/Heroku/Railway/GitHub Actions deploy trigger left undefined until Step 4's 'not already confirmed' catch-all and an unstated way to find <default branch>, and misread 'A || B && C' detection lines. Step 4 now defines a confirmed field and names the paths that leave the trigger unset, <default branch> resolves with gh repo view, and the two OR'd detection tests are grouped explicitly (same behavior). One judge run on the repaired text: 4/4/4, pass.
This commit is contained in:
1 parent
7249f01464
commit
55c2751fcb
1 file changed
+4
-4
@@ -61,10 +61,10 @@ Run the platform detection from the deploy bootstrap:
|
||||
# Platform config files
|
||||
[ -f fly.toml ] && echo "PLATFORM:fly" && cat fly.toml
|
||||
[ -f render.yaml ] && echo "PLATFORM:render" && cat render.yaml
|
||||
[ -f vercel.json ] || [ -d .vercel ] && echo "PLATFORM:vercel"
|
||||
{ [ -f vercel.json ] || [ -d .vercel ]; } && echo "PLATFORM:vercel"
|
||||
[ -f netlify.toml ] && echo "PLATFORM:netlify" && cat netlify.toml
|
||||
[ -f Procfile ] && echo "PLATFORM:heroku"
|
||||
[ -f railway.json ] || [ -f railway.toml ] && echo "PLATFORM:railway"
|
||||
{ [ -f railway.json ] || [ -f railway.toml ]; } && echo "PLATFORM:railway"
|
||||
|
||||
# GitHub Actions deploy workflows
|
||||
for f in $(find .github/workflows -maxdepth 1 \( -name '*.yml' -o -name '*.yaml' \) 2>/dev/null); do
|
||||
@@ -174,7 +174,7 @@ Use AskUserQuestion to gather the information:
|
||||
|
||||
### Step 4: Write configuration
|
||||
|
||||
Before writing, collect fields not already confirmed: merge method (squash/merge/rebase, offering only the methods `gh repo view --json squashMergeAllowed,mergeCommitAllowed,rebaseMergeAllowed` reports as allowed), pre-merge command or none, deploy trigger, and status/health checks. Ask only for missing values, across every platform path. If the project does not deploy, set platform/URL/workflow/status/health/trigger to `none`, retain its CLI/library project type, and skip deploy verification. Show the complete proposed configuration and obtain confirmation.
|
||||
Before writing, collect fields not already confirmed (a field is confirmed only when the user confirmed it or a platform section above set it; Fly, Heroku/Railway and GitHub Actions leave the deploy trigger unset): merge method (squash/merge/rebase, offering only the methods `gh repo view --json squashMergeAllowed,mergeCommitAllowed,rebaseMergeAllowed` reports as allowed), pre-merge command or none, deploy trigger, and status/health checks. Ask only for missing values, across every platform path. If the project does not deploy, set platform/URL/workflow/status/health/trigger to `none`, retain its CLI/library project type, and skip deploy verification. Show the complete proposed configuration and obtain confirmation.
|
||||
|
||||
Read CLAUDE.md (or create it). Find and replace the `## Deploy Configuration` section
|
||||
if it exists, or append it at the end.
|
||||
@@ -196,7 +196,7 @@ if it exists, or append it at the end.
|
||||
- Health check: {URL or command}
|
||||
```
|
||||
|
||||
The hooks block repeats the exact commands /land-and-deploy runs: `Deploy status` is the same value as `Deploy status command`, and `Health check` the same as `Post-deploy health check`. Write each value in both places.
|
||||
Resolve `<default branch>` with `gh repo view --json defaultBranchRef -q .defaultBranchRef.name`. The hooks block repeats the exact commands /land-and-deploy runs: `Deploy status` is the same value as `Deploy status command`, and `Health check` the same as `Post-deploy health check`. Write each value in both places.
|
||||
|
||||
### Step 5: Verify
|
||||
|
||||
|
||||
Reference in new issue
Block a user