Skip to content

Commit

Permalink
linux-eic-shell.yml: delay posting capybara comment until pages are d…
Browse files Browse the repository at this point in the history
…eployed (#1243)

This prevents comments from being posted before the links are alive.
  • Loading branch information
veprbl authored Jan 20, 2024
1 parent 7c40781 commit f1d22c2
Showing 1 changed file with 22 additions and 26 deletions.
48 changes: 22 additions & 26 deletions .github/workflows/linux-eic-shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -897,32 +897,6 @@ jobs:
with:
name: capybara
path: publishing_docs/pr/${{ matrix.pr }}/capybara/
- name: Populate capybara summary
if: github.event.pull_request.number == matrix.pr || steps.download_capybara.outputs.found_artifact == 'true'
run: |
echo "### Capybara summary for PR ${{ matrix.pr }}" >> publishing_docs/pr/${{ matrix.pr }}/capybara/index.md
find publishing_docs/pr/${{ matrix.pr }}/capybara/ -mindepth 1 -maxdepth 1 -type d -printf \
"- [%f](https://eicrecon.epic-eic.org/pr/${{ matrix.pr }}/capybara/%f/index.html)\n" | sort >> publishing_docs/pr/${{ matrix.pr }}/capybara/index.md
- name: Create capybara step summary (this PR)
if: github.event.pull_request.number == matrix.pr
run: |
cat publishing_docs/pr/${{ matrix.pr }}/capybara/index.md >> $GITHUB_STEP_SUMMARY
- name: Find capybara comment
id: find_comment
uses: peter-evans/find-comment@v2
if: github.event.pull_request.number == matrix.pr
with:
issue-number: ${{ matrix.pr }}
comment-author: 'github-actions[bot]'
body-includes: Capybara summary
- name: Create or update capybara comment
if: github.event.pull_request.number == matrix.pr
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ steps.find_comment.outputs.comment-id }}
issue-number: ${{ matrix.pr }}
body-file: publishing_docs/pr/${{ matrix.pr }}/capybara/index.md
edit-mode: replace
- name: Remove doxygen in PR
run: rm -rf publishing_docs/pr/*/doxygen
- uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -1030,3 +1004,25 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
- name: Populate capybara summary
run: |
echo "### Capybara summary for PR ${{ github.event.pull_request.number }}" >> publishing_docs/pr/${{ github.event.pull_request.number }}/capybara/index.md

This comment has been minimized.

Copy link
@wdconinc

wdconinc Jan 21, 2024

Contributor

We may need to mkdir this first.

This comment has been minimized.

find publishing_docs/pr/${{ github.event.pull_request.number }}/capybara/ -mindepth 1 -maxdepth 1 -type d -printf \
"- [%f](https://eicrecon.epic-eic.org/pr/${{ github.event.pull_request.number }}/capybara/%f/index.html)\n" | sort >> publishing_docs/pr/${{ github.event.pull_request.number }}/capybara/index.md
- name: Create capybara step summary (this PR)
run: |
cat publishing_docs/pr/${{ github.event.pull_request.number }}/capybara/index.md >> $GITHUB_STEP_SUMMARY
- name: Find capybara comment
id: find_comment
uses: peter-evans/find-comment@v2
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Capybara summary
- name: Create or update capybara comment
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ steps.find_comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body-file: publishing_docs/pr/${{ github.event.pull_request.number }}/capybara/index.md
edit-mode: replace

0 comments on commit f1d22c2

Please sign in to comment.