Skip to content

Commit f65ddb3

Browse files
authored
Merge pull request #137 from 10up/fix/136
Fixed action failure when the .distignore file is not present in repo.
2 parents bdc4de6 + 3fb8ff6 commit f65ddb3

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

deploy.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,11 @@ if [[ "$BUILD_DIR" = false ]]; then
114114
git config --global user.name "10upbot on GitHub"
115115

116116
# Ensure git archive will pick up any changed files in the directory try.
117-
test $(git ls-files --deleted) && git rm $(git ls-files --deleted)
118-
git add .
119-
git commit -m "Include build step changes"
117+
test $(git ls-files --deleted) && git rm $(git ls-files --deleted)
118+
if [ -n "$(git status --porcelain --untracked-files=all)" ]; then
119+
git add .
120+
git commit -m "Include build step changes"
121+
fi
120122

121123
# If there's no .gitattributes file, write a default one into place
122124
if [[ ! -e "$GITHUB_WORKSPACE/.gitattributes" ]]; then

0 commit comments

Comments
 (0)