-
-
Save allanfreitas/a450d1f473c289c1734548e1c0c5b899 to your computer and use it in GitHub Desktop.
Tiny Github local deployment bash script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Tiny Github deployment bash script | |
# @author José Luis Quintana <quintana.io> | |
# @datetime 2016-10-22 | |
# Settings | |
REPO_PATH=username/repo-name | |
DEPLOY_PATH=/deploy/path/on/my/server | |
# Deployment process | |
find ${DEPLOY_PATH}/ -mindepth 1 -delete | |
git clone https://github.com/${REPO_PATH}.git --depth=1 ${DEPLOY_PATH} | |
rm -fr ${DEPLOY_PATH}/.git | |
# Working directory | |
cd ${DEPLOY_PATH} | |
# Custom commands (replace) | |
npm i | |
npm run build | |
exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment