diff --git a/README.md b/README.md index 57782e4..4873dd7 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ An action for building Hugo websites. Build your site from a source branch and d This action supports deploying to the same repository or pushing build data to a submodule. It's great for automating Hugo site builds and maintaining a separate release branch. +**v2.1 Fix:** Build process no longer throws an error when there are no changes to commit. Safe exit instead. This was mainly done to prevent the whole workflow from failing. + ## Updates in v2 [See wiki for more info on these changes.](https://github.com/aormsby/hugo-deploy-to-pages/wiki)) @@ -98,7 +100,7 @@ jobs: # <> - name: Build site and push to release branch - uses: aormsby/hugo-deploy-to-pages@v2 + uses: aormsby/hugo-deploy-to-pages@v2.1 id: build_step # <> with: source_branch: 'main' diff --git a/hugo-deploy.code-workspace b/hugo-deploy.code-workspace index 1a6e457..d79cdcc 100644 --- a/hugo-deploy.code-workspace +++ b/hugo-deploy.code-workspace @@ -20,10 +20,7 @@ "titleBar.activeForeground": "#15202b", "titleBar.inactiveBackground": "#c26fb099", "titleBar.inactiveForeground": "#15202b99", - "editorGroup.border": "#d193c4", - "panel.border": "#d193c4", "sash.hoverBorder": "#d193c4", - "sideBar.border": "#d193c4", "statusBarItem.remoteBackground": "#c26fb0", "statusBarItem.remoteForeground": "#15202b" }, diff --git a/run/deploy.sh b/run/deploy.sh index a71efee..ab9412d 100644 --- a/run/deploy.sh +++ b/run/deploy.sh @@ -30,8 +30,9 @@ commit_with_message() { COMMAND_STATUS=$? if [ "${COMMAND_STATUS}" != 0 ]; then - # exit on git commit fail - write_out "${COMMAND_STATUS}" "Git commit step failed in '${1}' directory. Check output and try again." + # safe exit on git commit fail, but with warning + write_out "y" "Git commit step failed in '${1}' directory. It's possible there were no changes to commit, so a safe exit is assumed." + write_out 0 'No changes since last build. Exiting gracefully.' fi }