mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Simplify ci-push.sh: end script on any error (#4886)
Use the bash -e option to exit on any error, so || exit 1 is not needed. As a bonus, this lets us get the actual return code from any failures.
This commit is contained in:
parent
f7f55e8eff
commit
0ce1843070
@ -2,19 +2,14 @@
|
|||||||
|
|
||||||
# Push output back to GitHub
|
# Push output back to GitHub
|
||||||
|
|
||||||
|
# Exit script immediately if any command fails
|
||||||
|
set -e
|
||||||
|
|
||||||
cd output || exit 1
|
cd output
|
||||||
|
git config --global user.email "actions@github.com"
|
||||||
git config --global user.email "actions@github.com" || exit 1
|
git config --global user.name "GitHub Actions"
|
||||||
|
git add -A .
|
||||||
git config --global user.name "GitHub Actions" || exit 1
|
git commit --message "GitHub build: $GITHUB_RUN_NUMBER of $TW5_BUILD_BRANCH ($(date +'%F %T %Z'))"
|
||||||
|
git remote add deploy "https://$GH_TOKEN@github.com/Jermolene/jermolene.github.io.git" &>/dev/null
|
||||||
git add -A . || exit 1
|
git push deploy master &>/dev/null
|
||||||
|
cd ..
|
||||||
git commit --message "GitHub build: $GITHUB_RUN_NUMBER of $TW5_BUILD_BRANCH ($(date +'%F %T %Z'))" || exit 1
|
|
||||||
|
|
||||||
git remote add deploy "https://$GH_TOKEN@github.com/Jermolene/jermolene.github.io.git" &>/dev/null || exit 1
|
|
||||||
|
|
||||||
git push deploy master &>/dev/null || exit 1
|
|
||||||
|
|
||||||
cd .. || exit 1
|
|
||||||
|
Loading…
Reference in New Issue
Block a user