Skip to content

ci: remove workflow_dispatch from web-production#54

Merged
lukeocodes merged 1 commit intomainfrom
fix/remove-web-deploy-dispatch
May 4, 2026
Merged

ci: remove workflow_dispatch from web-production#54
lukeocodes merged 1 commit intomainfrom
fix/remove-web-deploy-dispatch

Conversation

@lukeocodes
Copy link
Copy Markdown
Member

Summary

Removes the workflow_dispatch trigger from web-production.yml so manual deploys can no longer fire from the GitHub Actions UI.

Why

I triggered a manual workflow_dispatch on this workflow today to push a doc-only fix that wouldn't have shipped via release-please (docs: doesn't bump). That deployed main HEAD, which already contained an in-flight version reference (0.2.20) from a merged release-please PR that hadn't actually shipped to PyPI yet. Result: cli.deepgram.com advertised a version users can't pip install. That should never have happened.

Production deploys need to be gated on a real root v* tag so the landing page never references a version PyPI doesn't have. The workflow_call path from release.yml already provides that — it fires AFTER publish completes and only on root tags.

What changes

  • .github/workflows/web-production.yml: drop workflow_dispatch: from the on: block. Add an inline comment documenting why it's absent so the next person who wants "a manual deploy button for testing" understands the guardrail and proposes a different mechanism instead of just re-adding the line.

Out of scope

The current cli.deepgram.com is showing 0.2.20 while PyPI tops out at 0.2.19. Fixing that is a separate decision — either:

  • wait for the next release-please cycle to actually ship 0.2.20 to PyPI, at which point the deployed page becomes correct
  • revert the deploy by triggering an old-version build (not possible with this PR's restrictions, intentionally)

I'm not going to touch the live site again without explicit direction.

Manual production deploys can ship a landing page advertising a version
not yet published to PyPI. Lock production deploys to the workflow_call
path from release.yml, which is itself gated on a real root v* tag and
fires AFTER PyPI publish completes.
lukeocodes added a commit that referenced this pull request May 4, 2026
## Summary

Adds a `publish-on-release.yml` workflow that fires on the `release:
published` event, so a human manually creating a GitHub release (with
`gh release create v0.X.Y`) can drive the PyPI publish through CI
without `workflow_dispatch` and without resorting to local `twine
upload`.

## Why

Release-please got stuck on PR #50 with `autorelease: pending` after the
merge. Every subsequent `release.yml` run aborts at the release-please
step (`untagged, merged release PRs outstanding`), so the existing
publish path can't fire. PyPI is on 0.2.19, manifest+pyproject on `main`
say 0.2.20.

Manual recovery options today are:
1. Run `gh release create v0.2.20 ...` to create the release. **But**
the existing publish job in `release.yml` is gated on release-please's
outputs, not on release events. Manual release alone doesn't trigger
publish.
2. Local `twine upload` against PyPI. Bypasses CI entirely. No.
3. `workflow_dispatch` to bypass the release-please gate. **But**
`workflow_dispatch` is what got us into the cli.deepgram.com vs PyPI
skew the other day. Removed in #54.

This PR adds a fourth option, gated on real release artifacts.

## How it works

`publish-on-release.yml` triggers on `release: published`. When fired:

1. checks out the released tag
2. installs python + build tools
3. runs `make build` and `make verify-packages`
4. uploads to PyPI via the same `pypa/gh-action-pypi-publish` action and
`PYPI_API_TOKEN` secret as the existing publish job

It only fires for root tags (`startsWith(github.event.release.tag_name,
'v')`) so sub-package tags like `deepctl-cmd-listen-v0.0.10` continue to
flow through `release.yml`.

## No double-publish

GITHUB_TOKEN-created releases (which is how release-please's
create-release step works) do **not** trigger downstream workflows.
GitHub Actions intentionally blocks that loop. So when release-please's
normal flow works, `release.yml`'s existing publish job handles it as
before, and this workflow stays asleep. This workflow only fires for
human-created releases.

(Same dynamic that the existing `web-production.yml` comment notes for
the workflow_call vs release-published trigger choice.)

## Recovery procedure for v0.2.20

After this lands:

1. `gh release create v0.2.20 --target 2fab886 --title v0.2.20 --notes
"$(curl -s
'https://raw.githubusercontent.com/deepgram/cli/2fab886/CHANGELOG.md' |
sed -n '/^## \[0.2.20/,/^## /{/^## \[0.2.20/!{/^## /d}};p')"`
2. that fires this workflow → builds + uploads to PyPI
3. relabel `#50`: `autorelease: pending` → `autorelease: tagged`
4. release-please unsticks for future runs

## What this PR doesn't do

- doesn't fix release-please's stuck state (manual relabel needed once
tag exists)
- doesn't trigger any release itself (no `workflow_dispatch`, no
scheduled run)
- doesn't touch `release.yml` (the normal flow continues unchanged)
- doesn't extend `bump-brew-formula` to fire on manual recovery releases
(separate concern; brew bump is currently broken anyway due to the
`deepgram-robot` 403 issue)

## Verification

- `python -c "import yaml;
yaml.safe_load(open('.github/workflows/publish-on-release.yml'))"`
parses cleanly
- only one job, gated on root `v*` tag
- uses the same SHA-pinned actions as the existing `release.yml` publish
job (`actions/checkout@34e1148...`, `actions/setup-python@a309ff8...`,
`pypa/gh-action-pypi-publish@ed0c539...`)
@lukeocodes lukeocodes merged commit 408cdd8 into main May 4, 2026
39 checks passed
@lukeocodes lukeocodes deleted the fix/remove-web-deploy-dispatch branch May 4, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant