This commit is contained in:
CrazyMax 2019-09-01 00:57:52 +02:00
parent f5ed7ad79c
commit eb12531076
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7
2 changed files with 3 additions and 9 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
# Jetbrains # Jetbrains
/.idea /.idea
/*.iml /*.iml
/public

View File

@ -19,17 +19,9 @@ cd "$BUILD_DIR"
git init git init
git config user.name "${GITHUB_ACTOR}" git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
if [ -z "$(git status --porcelain)" ]; then
echo "⚠️ Nothing to publish"
exit 0
fi
git remote rm origin > /dev/null 2>&1 || true
git remote add origin "${REPO}"
git add . git add .
git commit --allow-empty -m 'Deploy to GitHub pages' git commit --allow-empty -m 'Deploy to GitHub pages'
git push --force --quiet "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "$TARGET_BRANCH" git push --force --quiet "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "master:$TARGET_BRANCH"
rm -rf .git rm -rf .git
cd "$GITHUB_WORKSPACE" cd "$GITHUB_WORKSPACE"