Created
March 6, 2021 11:33
-
-
Save helderberto/1ef5f7fa9e369a652907f12282b07cd2 to your computer and use it in GitHub Desktop.
Automatic Deploy
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/bin/env bash | |
set -euo pipefail | |
org_head=$(git rev-parse HEAD) | |
printf "Deploying updates to GitHub...\033[0m\n" | |
printf "\033[0;32mDeploying commit $org_head of '🧠 braindump' \n\033[0m" | |
## Commit and push | |
if [[ `git status --porcelain` ]]; then | |
git add . | |
git commit -m "🧠 Automatic braindump commit $(date) | |
This is a commit of '$org_head' | |
Respository: github.com/helderburato/braindump" | |
else | |
printf "No changes detected.\n" | |
fi | |
git push origin main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment