Black Friday Sale: 50% off all plans for new accounts!
Use code BLACKFRIDAY50

Header

How can I run SSH commands without uploading files in a deployment?

To run SSH commands without the need to upload any files from your repository, you can create a new server in your project with the Shell protocol. Details on how to create this server type can be found here.

Once created, you can start a new deployment to this server by selecting a start revision and end revision. Note that these revisions are only used for reference purposes, and no files will be physically uploaded into your server.

You can, for example, use these revisions as reference for your SSH command(s), where you can specify variables that read the state of your repository, and perform different actions based on their values.

An important detail is that the shell server will run the specified commands in the working directory. Nonetheless, you can modify your directory at runtime if needed with a cd command.

As a side note, these shell deployments can upload your config files if needed.

Tree

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