denoland / denoland/deploy_feedback

deno deploy command ignores gitignored files

Open
#940 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
79
Forks
5
PR merge metrics
No merged PRs in 30d

Description

I posted about this earlier this month in the deploy channel but figured I'd create an issue for it since others have run into the same issue when trying to deploy from a github action instead of using deno deploy's build settings.

Found out that the deno deploy cli command is respecting gitignore. If I have my public/build directory in there, it doesn't get deployed when running the deno deploy cli command from my github action. If I instead have my build command configured in deno deploy so it runs on their server instead of the github action, the build artifacts in public/build are not ignored. To be able to deploy my build artifacts from my github action without removing it from my gitignore, I had to add a step that removes it from gitignore before running the deploy command.

```yaml
- name: Build application
run: deno task build:prod
- name: Unignore build output for deploy
run: sed -i '\|^public/build$|d' .gitignore
- name: Deploy to production
timeout-minutes: 5
run: deno deploy --org udibo --app udibo --prod --token ${{ secrets.DENO_DEPLOY_TOKEN }}
```

Why does the deno deploy cli command respect the .gitignore and is there a different way to work around it other than unignoring it? The help flag doesn't appear to show any other arg options to ensure these build artifacts are included when the application is deployed.

Here is an example url for a deployment done without that new unignore step. The build file is missing.
https://udibo-8abdsr1vc5td.udibo.deno.net/build/main.css

Then once I add that step, it successfully uploads that file. Here is an example of the file I was expecting to get uploaded.
https://udibo-c1159q6nkm38.udibo.deno.net/build/main.css

Just including those preview urls in case it can help with identifying why this is happening. I think it's not uncommon for people to gitignore build artifacts.

Here is another example showing that before switching to a github action, when the application in deploy is configured to run the deno task build:prod command, it doesn't ignore the artifact. so it seems gitignore only applies to the cli command and not to the app configuration build command.
https://udibo-k3ek9cwh5p11.udibo.deno.net/build/main.css

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the reported GitHub Actions sequence and the .gitignore entry for public/build, then reproduce the deployment using deno deploy and compare it with the app-configured build command. Check the deno deploy CLI help and related deployment behavior; done means build artifacts upload without removing their gitignore entry, or the supported limitation and workaround are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
deno, github-actions
Domain
cli, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.