Improve the gh-actions CD script

This commit is contained in:
Cotes Chung 2021-01-26 23:26:03 +08:00
parent ec522e5219
commit 9ae2aee222
1 changed files with 2 additions and 1 deletions

View File

@ -16,7 +16,8 @@ init() {
fi
# Gemfile could be changed by `bundle install` in actions workflow
if [[ -n $(git status Gemfile.lock --porcelain) ]]; then
if [[ -n $(git ls-files | grep Gemfile.lock) && -n \
$(git status Gemfile.lock --porcelain) ]]; then
git checkout -- Gemfile.lock
fi