From b3565ae37e90ea7494e30bb75c96cdf2e9c1ace7 Mon Sep 17 00:00:00 2001 From: IsaccBarker Date: Wed, 13 Nov 2024 00:24:39 -0700 Subject: [PATCH] [58] implement --- .github/workflows/sphinx.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sphinx.yaml b/.github/workflows/sphinx.yaml index 6eaf20b..11841ca 100644 --- a/.github/workflows/sphinx.yaml +++ b/.github/workflows/sphinx.yaml @@ -12,6 +12,7 @@ on: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read + pull-requests: write pages: write id-token: write @@ -59,12 +60,21 @@ 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 the artifact pulling the id from the `readme` step. + - name: Post the artifact + uses: CDCgov/cfa-actions/post-artifact@main + if: ${{ github.event_name == 'pull_request' }} + with: + artifact-name: readme + 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