Header

Excluding files with .deployignore

New Features

We're pleased to announce the addition of a new feature to the Deploy platform - the ability to specify files or folders to be ignored during deployments with a .deployignore file.

This saves any possible issues that may occur from uploading unwanted files to your server, such as config files that only apply to a development environment, or dependencies used during the Build Pipeline that don't need to be uploaded to the server.

It works very similarly to a .gitignore file and follows the same rules as the UI based Excluded files - just create a .deployignore file in the root of your repository, adding each exclusion rule as a new line.

## Directories to ignore
log/**
config/**
node_modules/**

## Files to ignore
Gemfile.lock 

Once the file has been pushed to your repository, you'll find that Deploy checks your rules and excludes the specified files and directories in all future deployments. The .deployignore file can be used in any of the supported SCM repositories, whether that's Git, Mercurial or Subversion.

Please note that this will apply to all servers within a project - if you wish to add exclusions that only apply to certain servers you'll need to use our Excluded Files functionality instead.

As always, don't hesitate to get in touch if you have any questions.

A little bit about the author

I'm Adam W, or as everyone prefers to call me - Batman. I get a lot of satisfaction out of helping our customers and am committed to making their customer experience as positive as possible. When not offering support to our customers, you'll find me gaming, listening to music or running.

Tree

Proudly powered by Katapult. Running on 100% renewable energy.