Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support saving multiple deploy settings in deno.json #348

Open
magurotuna opened this issue Dec 9, 2024 · 0 comments
Open

Support saving multiple deploy settings in deno.json #348

magurotuna opened this issue Dec 9, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@magurotuna
Copy link
Member

Let's say we have a workspace where three workspace members reside:

.
├── app_bar
│   ├── deno.json
│   └── main.ts
├── app_foo
│   ├── deno.json
│   └── main.ts
├── deno.json
└── shared
    ├── deno.json
    └── lib.ts

We want to deploy app_bar/main.ts and app_foo/main.ts as separate Deno Deploy projects. Currently, the easiest way to do this is running the following two commands respectively:

  • deployctl deploy --project project-foo --entrypoint app_foo/main.ts
  • deployctl deploy --project project-foo --entrypoint app_bar/main.ts

This works, but the problem is we can't save these in the root deno.json for future deploys, because "deploy" section now expects a single object and doesn't allow multiple settings.

  "deploy": {
    "project": "<Project UUID>",
    "exclude": [
      "**/node_modules"
    ],
    "include": [],
    "entrypoint": "app_foo/main.ts"
  }

It would be probably better to have deno.json support for multiple settings. Something like:

"deploy": [
  {
    "projectName": "project-foo",
    "project": "<Project UUID>",
    "exclude": [
      "**/node_modules"
    ],
    "include": [],
    "entrypoint": "app_foo/main.ts"
  },
  {
    "projectName": "project-bar",
    "project": "<Project UUID>",
    "exclude": [
      "**/node_modules"
    ],
    "include": [],
    "entrypoint": "app_bar/main.ts"
  }
]

This would allow deployctl to support deploys for different projects, like deployctl deploy --project project-foo without the need to pass other settings such as exclude, include, and entrypoint.

@magurotuna magurotuna added the enhancement New feature or request label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant