Created
November 14, 2020 08:03
-
-
Save julienbourdeau/5d6ee749fa3a32a453b472ee941db6c0 to your computer and use it in GitHub Desktop.
Rebuild assets and deploy on Laravel Forge
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
#!/usr/local/bin/bash | |
# function e_header() { printf "\n${yellow}========== %s ==========${reset}\n" "$@" } | |
# function e_arrow() { printf "➜ $@\n" } | |
# TODO: Check if current branch is `master` | |
e_header "Rebuilding assets" | |
echo | |
e_arrow "Use correct node version (with nvm)" | |
. /usr/local/opt/nvm/nvm.sh | |
nvm use | |
echo | |
e_arrow "Build assets" | |
yarn prod | |
e_header "Commiting" | |
echo | |
e_arrow "Commit assets" | |
git add public | |
echo | |
git status | |
echo | |
git commit -m '🎨 Rebuild assets' | |
echo | |
git lg -4 | |
echo | |
e_arrow "Push to Github" | |
git push | |
e_header "Deploy with Forge CLI" | |
echo | |
forge deploy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment