Created
November 19, 2019 12:22
-
-
Save rjbultitude/879d044fb359a7ad8c945c2b2bc7d624 to your computer and use it in GitHub Desktop.
Revisions
-
rjbultitude created this gist
Nov 19, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ #/bin/bash npm run build # get the current branch name and create a directory destination using it dest_dir="project-dir/$(git rev-parse --abbrev-ref HEAD)" # make the destination directory mkdir -p $dest_dir # copy the web build cp -R public/build/ $dest_dir # commit and push changes cd project-dir git add . git commit -m "new deployment at ${date}" git pull git push