What is the best approach to automate a deployment using gulp APIs?

What is the best approach to automate a deployment using gulp APIs with the following constraints:

The repository located in bit-bucket.
Steps:

pull latest changes from the master branch.

increment the version using this command "npm version patch".

execute build task.

push changes into the repository.

Does something like this can achieve what I want ?

"build": "git pull origin master && npm version patch && gulp && git push origin master",
You already invited:

Albie

Upvotes from:

 If you don’t need to commit the build results, or if gulp takes care of committing its results for you, and if either gulp or git push causes your build results to be deployed, then it looks like your script should work.

If you wanna answer this question please Login or Register