Home ci 09. deployments: Exclude Files from Deployments with .epycbyteignore

09. deployments: Exclude Files from Deployments with .epycbyteignore

Last updated on Aug 05, 2025

Excluding Files from Deployments with .epycbyteignore

The .epycbyteignore file is a powerful tool for managing deployments on Epycbyte. It allows you to specify which files and directories should be excluded during the deployment process.

Overview

The .epycbyteignore file works similarly to a .gitignore file but is specific to Epycbyte. By placing this file in your project's root directory, you can exclude certain files and directories from being uploaded or served on Epycbyte.

How It Works

  1. Default Exclusions: All files are excluded by default unless specified otherwise.
  2. Including Files: To include a file or directory, add its name prefixed with ! in the .epycbyteignore file.
  3. Structure: The file should be placed at the root level of your project.

Example Usage

To exclude specific files and directories:

.epycbyteignore image private.html

This will prevent the /image directory and /private.html file from being uploaded.

Advanced Use Cases

  • Allowing Specific Files: Add !file_name to allow a specific file.
  • Ignoring All Files: Start with /* to ignore all files in the root directory.
    .epycbyteignore /*
    
  • Combining Rules: Use multiple lines to create complex rules.

Monorepos and Workflows

  • In a monorepo, the .epycbyteignore file at the project root takes precedence over any other configuration.
  • If no .epycbyteignore is found, Epycbyte uses the one at the root level.

Best Practices

  1. Security: Use it to protect sensitive files like private.html.
  2. Efficiency: Upload only necessary files, reducing deployment size and improving speed.
  3. Compliance: Ensure compliance with specific project requirements by excluding unnecessary files.

By leveraging the .epycbyteignore file, you can streamline your deployment process while keeping your project secure and efficient.