-
Notifications
You must be signed in to change notification settings - Fork 219
CI workflows should run if pom.xml or workflow yaml files changed #712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
+18
−18
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,38 +41,38 @@ jobs: | |
| TAG_NAME: ${{ github.event.inputs.tag_ref }} | ||
| run: | | ||
| if [ -z "$TAG_NAME" ]; then echo "ERROR: No tag specified"; exit 1; fi | ||
|
|
||
| # 1. Initialize error tracking | ||
| EXIT_CODE=0 | ||
|
|
||
| # 2. Configure Git Identity | ||
| git config user.email "[email protected]" | ||
| git config user.name "github-actions[bot]" | ||
|
|
||
| # 3. Ensure gh-pages exists and is fetched | ||
| echo "ECHO: git fetch origin gh-pages" | ||
| git fetch origin gh-pages | ||
|
|
||
| # 4. Create worktree for the gh-pages branch in a separate folder | ||
| echo "ECHO: git worktree add -B gh-pages ./gh-pages-dir origin/gh-pages" | ||
| git worktree add -B gh-pages ./gh-pages-dir origin/gh-pages | ||
|
|
||
| # 5. Deployment Logic in a subshell to capture exit code | ||
| ( | ||
| set -e | ||
| TARGET_PATH="gh-pages-dir/docs/$TAG_NAME" | ||
| mkdir -p "$TARGET_PATH" | ||
|
|
||
| echo "ECHO: cp -a target/site/apidocs/. $TARGET_PATH/" | ||
| cp -a target/site/apidocs/. "$TARGET_PATH/" | ||
| cd gh-pages-dir | ||
|
|
||
| echo "ECHO: git pull origin gh-pages --rebase" | ||
| git pull origin gh-pages --rebase | ||
|
|
||
| echo "git add docs/$TAG_NAME" | ||
| git add "docs/$TAG_NAME" | ||
|
|
||
| if git diff --staged --quiet; then | ||
| echo "No changes detected for Javadoc $TAG_NAME." | ||
| else | ||
|
|
@@ -83,11 +83,11 @@ jobs: | |
| git push origin gh-pages | ||
| fi | ||
| ) || EXIT_CODE=$? | ||
|
|
||
| # 6. Cleanup (Always runs) | ||
| echo "ECHO: Cleaning up worktree..." | ||
| git worktree remove --force ./gh-pages-dir || true | ||
|
|
||
| # 7. Final exit based on subshell success | ||
| exit $EXIT_CODE | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.