forked from cloudhubs/cimetOld
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
13 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -26,7 +26,7 @@ jobs: | |
|
||
javadoc: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
needs: test # Ensures the javadoc phase runs only after the test phase succeeds | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
@@ -47,11 +47,12 @@ jobs: | |
exit 1 | ||
fi | ||
deploy: | ||
update-docs: | ||
runs-on: ubuntu-latest | ||
|
||
needs: [test, javadoc] # This ensures that deploy phase runs only after both test and javadoc phases succeed | ||
if: github.event.pull_request.merged == true # Ensures this runs only when the PR is merged | ||
steps: | ||
- name: Checkout repository | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up SSH for deploy key | ||
|
@@ -66,14 +67,15 @@ jobs: | |
- name: Generate Javadoc | ||
run: mvn javadoc:javadoc --no-transfer-progress | ||
|
||
- name: Push Javadoc to GitHub Pages | ||
- name: Deploy docs to GitHub Pages | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
git remote set-url origin [email protected]:${{ github.repository }}.git | ||
rm -rf docs/apidocs | ||
mv target/site/apidocs docs/apidocs | ||
git add docs/apidocs | ||
git commit -m "Update Javadoc" | ||
git push origin main | ||
git push origin gh-pages | ||
env: | ||
GIT_SSH_COMMAND: "ssh -i ~/.ssh/deploy_key -o IdentitiesOnly=yes" | ||
GIT_SSH_COMMAND: "ssh -i ~/.ssh/deploy_key -o IdentitiesOnly=yes" |
This file contains 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 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