> For the complete documentation index, see [llms.txt](https://docs.umbraco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.umbraco.com/umbraco-cloud/build-and-customize-your-solution/handle-deployments-and-environments/umbraco-cicd/samplecicdpipeline/artifact-best-practice.md).

# Deployment Artifact Best Practices

For a smooth deployment process, it is recommended to follow the best practice guidelines for artifacts outlined in this article.

The zip package you are deploying must contain everything that is normally present in an Umbraco Cloud environment repository.

Every new Umbraco Cloud project contains a `readme.md` file that explains the structure and how you can adapt it to fit your needs.

{% hint style="info" %}
The sample scripts on GitHub include a way to package the zip. As the scripts are samples, they show a universal way to do this, which works well for most people. But not all projects are alike, and you may not want to use that particular approach.
{% endhint %}

## Exclude .NET Binaries

Don’t include any binary build artifacts coming from the .NET build/publish process.

The general deployment process on Umbraco Cloud needs the source code, and the system will rebuild it once it is pushed back to the environment.

## Exclude the `.git` directory

The `.git` directory will be ignored in the isolated instance, but the extra megabytes will still slow down the deployment process. Due to these two facts, it is recommended not to include this directory in your deployments.

Also, consider the artifact size limitation below.

## Include only finished frontend assets

If you are using modern frontend build tools, include only the finished frontend assets that are needed. There is no need to include JavaScript or TypeScript source files if you need to build the frontend.

## Keep the Artifact as small as possible

It is good practice to keep the zipped artifact as small as possible.

* Large files will slow down the underlying git operations and, therefore, also the deployment process.
  * Do not include large files like pictures and PDFs in the artifact.
  * Large files need to be uploaded to the Azure Blob Storage connected to your environment.
* Remove old and leftover code from the artifact.
  * Orphaned `.csproj` files with outdated package references are a common cause for issues in the deployment process.

Size limitations to consider:

* Version 1 endpoints allow file sizes up to 128 MB.
* Version 2 endpoints allow file sizes up to 256 MB.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.umbraco.com/umbraco-cloud/build-and-customize-your-solution/handle-deployments-and-environments/umbraco-cicd/samplecicdpipeline/artifact-best-practice.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
