-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpush.sh
executable file
·34 lines (32 loc) · 899 Bytes
/
push.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# push.sh 'comment'
#!/usr/bin/env bash
# ./push.sh commit_message
function addcommitpush () {
message=(\'"$@"\')
current=$(git branch | grep "*" | cut -b 3-)
# read -r -i "$current" -e branch
remote=$(git remote -v | head -1 | cut -d ' ' -f 1 )
echo push local branch "$current" to "$remote" y n ?
read -r yn
if [ "$yn" = y ]; then
git pull
# echo "$current" "$remote"
git add -A
# git commit -a -m "$message"
cz c
mike deploy 2025 latest --push
# tshoot mike errors this fixed it
# pip install --upgrade -r requirements.txt
# pip install --upgrade mike
# mike set-default latest
mike list
git push origin "$current"
else
echo "nope"
fi
}
addcommitpush "$1"
# do not run this it will erase mike versioning
# see workflow.md to deploy push gh-pages branch
# mkdocs gh-deploy
open https://github.com/shane0/buddhism/actions