generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 184-add-outputs-to-sim-data
- Loading branch information
Showing
2 changed files
with
19 additions
and
24 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 |
---|---|---|
|
@@ -171,6 +171,8 @@ jobs: | |
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./docs/ | ||
name: github-pages | ||
retention-days: 7 | ||
|
||
deploy: | ||
# check builds on PRs but only deploy when main changes | ||
|
@@ -190,31 +192,23 @@ jobs: | |
uses: actions/deploy-pages@v4 | ||
|
||
post-page-artifact: | ||
# only comment on PRs | ||
runs-on: ubuntu-latest | ||
|
||
if: ${{ github.event_name == 'pull_request' }} | ||
|
||
# This job depends on the `build` job | ||
needs: combine | ||
runs-on: ubuntu-latest | ||
|
||
# Required permissions | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Find Comment | ||
uses: peter-evans/find-comment@v3 | ||
id: fc | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-author: 'github-actions[bot]' | ||
body-includes: Your page is ready to preview | ||
contents: read | ||
pull-requests: write | ||
|
||
- name: Create or update comment | ||
uses: peter-evans/create-or-update-comment@v4 | ||
steps: | ||
# Post the artifact pulling the id from the `readme` step. | ||
# The msg will refer to the arfitact as 'README file'. | ||
- name: Post the artifact | ||
uses: CDCgov/cfa-actions/[email protected] | ||
with: | ||
comment-id: ${{ steps.fc.outputs.comment-id }} | ||
issue-number: ${{ github.event.pull_request.number }} | ||
body: | | ||
Thank you for your contribution, @${{ github.triggering_actor }} :rocket:! Your page is ready to preview [here](https://github.com/${{github.repository}}/actions/runs/${{ github.run_id }}/artifacts/${{ needs.build.outputs.page_artifact_id }}) | ||
edit-mode: replace | ||
artifact-name: github-pages | ||
gh-token: ${{ secrets.GITHUB_TOKEN }} |
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