-
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.
* [58] implement * [gha] fix artifact name * [gha] give sphinx action permissions * [gha] segregate into distinct jobs * Update sphinx.yaml --------- Co-authored-by: George G. Vega Yon <[email protected]>
- Loading branch information
1 parent
f4cb110
commit 07541fc
Showing
1 changed file
with
21 additions
and
4 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 |
---|---|---|
|
@@ -11,9 +11,8 @@ on: | |
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
actions: read | ||
pull-requests: write | ||
|
||
jobs: | ||
build: | ||
|
@@ -59,12 +58,30 @@ jobs: | |
run: mv README_files docs/build/html | ||
|
||
# Upload | ||
- name: Upload artifacts | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
name: github-pages | ||
path: docs/build/html/ | ||
|
||
post-page-artifact: | ||
if: ${{ github.event_name == 'pull_request' }} | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Post comment preview | ||
uses: CDCgov/cfa-actions/[email protected] | ||
with: | ||
artifact-name: github-pages | ||
gh-token: ${{ secrets.GITHUB_TOKEN}} | ||
message: "Thanks for your contribution, ${{ github.actor }}; your `{ artifact-name }` is ready for download [here]({ artifact-url })." | ||
|
||
deploy: | ||
# Deploy to the github-pages environment | ||
# but not on PRs | ||
|