fix: fail the deploy instead of masking reconcile restore errors

Addresses review feedback on the concurrent-deploy reconcile logic. The
authoritative restore commands in reconcile_owned_paths previously used
`|| true`, so if restoring an owned documentation path failed, the action
would silently stage and commit a deletion and publish broken/missing docs.

- Owned purge/keep paths always exist in the deploy commit, so their
  `git checkout`/`git add` restores are now unmasked: a failure fails the
  job under `set -e` instead of committing a silent deletion. Only the
  best-effort pre-clean `git rm --ignore-unmatch` stays lenient.
- The "latest" yield path only restores from the remote when the remote
  actually publishes it (guarded by `git ls-tree`); otherwise the staged
  removal stands, avoiding an abort on a now-absent pathspec. The
  `git ls-tree` check is unmasked so an invalid FETCH_HEAD fails closed.

Assisted-by: claude-code:claude-4.8-opus
1 file changed
tree: c50c9f17cd7802a1a10a094021348cec779bad5a
  1. .github/
  2. cascade-merge/
  3. deploy-github-pages/
  4. etc/
  5. export-gradle-properties/
  6. licenses/
  7. post-release/
  8. pre-release/
  9. tests/
  10. .asf.yaml
  11. .gitignore
  12. LICENSE
  13. NOTICE
  14. README.md
README.md

Apache Grails - GitHub Actions

CI Users Mailing List Dev Mailing List Slack

Introduction

This repository hosts GitHub Actions that power the release workflows for Apache Grails & related projects.

Actions include:

  1. pre-release - handles setting the project version based on the Git tag & running various pre-release tasks.
  2. deploy-github-pages - handles publishing documentation to GitHub Pages for both snapshots & releases.
  3. post-release - assists in merging tagged changes back to the target branch & bumping to the next development version.
  4. export-gradle-properties - exposes selected Gradle properties as environment variables.
  5. cascade-merge - merges a branch forward through an explicit ordered list of downstream branches when there are no conflicts.

Who can use these actions

These actions are meant to assist in using the GitHub Release feature to produce a published release. They were primarily designed for Gradle projects that need to set a version & automate parts of the release process such as the changing of the project version & publishing documentation.

Usages

Used by: https://github.com/search?q=org%3Aapache+%22uses%3A+apache%2Fgrails-github-actions%2F%22+language%3Ayml&type=code

Further information

To use these actions, please refer to the individual README files in each action's directory.

Testing

To bootstrap the test project so it can be run against the source distribution, execute:

cd tests/gradle-bootstrap
gradle bootstrap

Then to run the tests, execute:

cd ..
gradle check