Repository navigation
Conversation
Regenerated from the spec of argos-ci/argos#2786, which is not deployed yet. With it, `POST /v2/deployments` takes a `url` in place of `files` to report a deployment hosted elsewhere. The diff against argos main is only that change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`argos deploy --url <url>` tells Argos where a commit is deployed on Vercel, Netlify or any other host. Argos links the deployment to the builds of the same commit and opens each screenshot on it. The directory argument becomes optional: pass a directory to deploy a static build on Argos, or `--url`, not both. In `@argos-ci/core`, `deploy()` takes `url` in place of `root` and resolves to the deployment either way. Both reuse the same CI detection for the commit, branch, pull request and head commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ption Reporting a deployment with `argos deploy --url` gives Argos what both did, once per commit instead of per screenshot. They keep working, but are marked `@deprecated` and print a warning once per process that points to `argos deploy --url`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SDK and CLI half of ARG-521. Backend: argos-ci/argos#2786 (open, not deployed yet).
What
argos deploy --url <url>reports a deployment hosted on Vercel, Netlify, Cloudflare or anywhere else. Argos links it to the builds of the same commit: the build page shows it, and each screenshot opens on the same page of that deployment.ARGOS_PREVIEW_BASE_URLdid that per screenshot, so it and thepreviewUrlupload option are now deprecated.CLI:
argos deploy [directory] [--url <url>]. Pass a directory to deploy a static build on Argos (unchanged), or--url, not both.--prod,--projectand--tokenwork for both.Core:
deploy()takesurlin place ofroot. The parameters are a union, so passing both is a type error (and a runtime error from plain JS). It resolves to the deployment either way.API client: regenerated with
urland an optionalfiles.Deprecation:
@deprecatedonUploadParameters.previewUrl(the Playwright, Cypress and Vitest options inherit it) andConfig.previewBaseUrl, plus a warning printed once per process for each one in use:Both keep working exactly as before.
Choices worth a look
argos deploy --url, not a new command. The API has one endpoint whereurlreplacesfiles, and everything around it is shared: commit, branch and pull request detection,--prod,--project, the token. One command keeps "a deployment" a single concept in the CLI, as it is in the API.deploy --urlcould read as "deploy to this URL", so the directory and--urlare mutually exclusive with an explicit error, and the help text says what each does and shows both forms:No automatic deployment when
ARGOS_PREVIEW_BASE_URLis set. I considered havingupload()report a deployment from the variable and chose not to:deployments:write. A token limited tobuilds:writewould start failing uploads, or the SDK would have to swallow the error.previewUrlcan rewrite paths, which a deployment can't express.So the variable keeps working as it does today, and the warning points to the one-line replacement.
API client generated from the PR's spec.
build-schema-typesreads the production spec, which lacksurluntil #2786 ships. I generated it from that branch's backend build (generate-openapi.jsat 890adddbd). The diff against the committed schema (argos main) is only #2786's change:filesoptional,urladded, the operation description.deploy({ url })reads the deployment back. For an external deployment,POST /deploymentsanswers{ deploymentId, uploadFiles: [] }.deploy()then callsGET /deployments/{id}(samedeployments:writepermission) so it resolves to the same shape as a finalized Argos deployment, with the URL as Argos normalized it. That costs one extra request.The CLI checks
--urlloosely. Only that it is an http or https URL, so a missing scheme (my-app.vercel.app) fails before any request, with the fix in the message. The API stays the source of truth for the rest.Merge and release
Merge and release once argos#2786 is deployed. Until then the API answers 400 to a
url(it requiresfiles), soargos deploy --urlwould fail. Nothing changes for existing users. The docs are written in a separate argos-ci/docs PR.Testing
deploy.test.ts: the url request carries no files, nothing is finalized, and the deployment read back is returned; pull request, head commit and environment are sent;rootandurltogether are rejected before any request.preview-url.test.tsandupload.test.ts: formatting, one warning per source per process, the option taking precedence, andARGOS_PREVIEW_BASE_URLstill settingpreviewUrlon screenshots while warning.deploy.test.ts: directory, url, both, neither, invalid URLs. New e2e:argos deploywith no argument exits 1 with the error (no API call).argos deploy --url … --prodsent{ commit, branch, environment: "production", url }without files and printed✔ Deployment reported: https://web-git-feature-login.vercel.app/.argos uploadwithARGOS_PREVIEW_BASE_URLset printed the warning once.check-types,lint,check-formatand unit tests pass for api-client, core, cli, playwright, cypress and vitest.--urlyet because CI's e2e runs against production; it is worth adding once #2786 ships.🤖 Generated with Claude Code