denoland / deploy_feedback

For reporting issues with Deno Deploy
https://deno.com/deploy
74 stars 5 forks source link

[Bug]: deployctl deploy does not honor include/exclude directives #647

Open cknight opened 5 months ago

cknight commented 5 months ago

Problem description

I have the following workspace:

image

And the following deno.json setup:

{
  "deploy": {
    "project": "33c4929e-bd0e-419e-b0fd-5c1f230dde58",
    "exclude": [
      "**/node_modules"
    ],
    "include": [
      "./build"
    ],
    "entrypoint": "https://deno.land/std@0.221.0/http/file_server.ts"
  }
}

However, after deployctl deploy, it uploads all directories in the root of my workspace (but not files?), and when I launch the site via Deploy, I get:

image

As you can see, the include and exclude directives in my deno.json were ignored. I've also tried using "./build/**" and removing the exclude (since there is no node_modules inside the build folder). Same result.

Steps to reproduce

  1. Run deployctl deploy --include="./build" on a project which has a number of folders, including one called build.

Expected behavior

Only the build folder would be uploaded.

Environment

Deno 1.42.1 deployctl v1.12.0

Possible solution

No response

Additional context

No response

cknight commented 5 months ago

As a workaround, I've copied my deno.json into the /build folder and removed the include and exclude directives from it. I then ran deployctl deploy from the /build folder and It now deploys only the files I wanted.