diff --git a/deploy.sh b/deploy.sh index 35fffc9..4a4c08e 100755 --- a/deploy.sh +++ b/deploy.sh @@ -21,6 +21,10 @@ echo "Checking out '$TARGET_BRANCH'..." git checkout "$TARGET_BRANCH" \ || exit 1 +echo "Saving dist files..." +git add dist/ \ +&& git stash push dist/ + echo "Removing all extra files..." git rm -rf . \ && rm -rf node_modules @@ -28,6 +32,9 @@ git rm -rf . \ echo "Copying files from '${SOURCE_BRANCH}' to '${TARGET_BRANCH}'" git checkout "${SOURCE_BRANCH}" action.yml package.json package-lock.json +echo "Restoring dist files..." +git stash pop + echo "Adding files..." git add -vA