A little tip on making your deployment less tedious

bawa_geek

Lakh Bawa

Posted on August 21, 2020

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;
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
bawa_geek
Lakh Bawa

Posted on August 21, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related