-
-
Save giasraya/a010134598d5bcdf4b3e00b1f56ad59f 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