DEV Community

Lakh Bawa
Lakh Bawa

Posted on Edited on

A little tip on making your deployment less tedious

Deployment can be a pretty time consuming and tedious task when your website is under development. To properly deploy, you have to run a number of commands to deploy your code and test it.
To overcome this, I recently created a bash script mentioning all the required commands.

deploy.sh

# mention full paths for all the commands to be on the safe side
#!/bin/bash
cd /root/staging;git pull;cd /root/staging/frontend;npm run build;
📺 Info Siaran: bawa geek/a little tip on making your deployment less tedious n - Info Live Streaming 2026 📺 Info Siaran: bawa geek/a little tip on making your deployment less tedious n - Info Live Streaming 2026

These commands will run one after another and will give full feedback just like when you run individual command.you can cancel anytime by pressing CTRL/CMD+c

Running the deployment script.

sh deploy.sh
📺 Info Siaran: bawa geek/a little tip on making your deployment less tedious n - Info Live Streaming 2026 📺 Info Siaran: bawa geek/a little tip on making your deployment less tedious n - Info Live Streaming 2026

Top comments (1)

📺 Info Siaran: bawa geek/a little tip on making your deployment less tedious n - Info Live Streaming 2026
 
joelbonetr profile image
JoelBonetR 🥇 •

Sorry, I may be out of context but where it's intended for?

I simply perform an easy ci.yml to automate deploys and that's all (and works for development, test and production).

I'm assuming your script are executed on the server "as is", isn't it?