Skip to content

Commit

Permalink
fix(script): support untrack files on deploying
Browse files Browse the repository at this point in the history
  • Loading branch information
kamontat committed Mar 20, 2024
1 parent 5a78de0 commit c12c690
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions common/scripts/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,16 @@ _execute_deploy() {
fi
done

if test -n "$CI" && test -n "$GITHUB_ACTIONS" || $_AC_FORCE; then
if test -n "$CI" && test -n "$GITHUB_ACTIONS" || "$_AC_FORCE"; then
cd "$output"

info "Starting deploy '%s' package" "$PWD"
git status

if ! git diff --exit-code --quiet || "$_AC_FORCE"; then
info "Updating user config on git"
if ! test -z "$(git status --porcelain)" || "$_AC_FORCE"; then
git config --local user.name "$_AC_COMMIT_NAME"
git config --local user.email "$_AC_COMMIT_EMAIL"

info "Deploying all changed to git"
git add --all
git commit -m "$_AC_COMMIT_MSG"
git push origin "$_AC_COMMIT_BRANCH"
Expand Down

0 comments on commit c12c690

Please sign in to comment.