Skip to content

Instantly share code, notes, and snippets.

@helderberto
Created March 6, 2021 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save helderberto/1ef5f7fa9e369a652907f12282b07cd2 to your computer and use it in GitHub Desktop.
Save helderberto/1ef5f7fa9e369a652907f12282b07cd2 to your computer and use it in GitHub Desktop.
Automatic Deploy
#!/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