generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding action to post artifact (#90)
* Adding action to post artifact * Forgot to add path * Forgot to update news * Fixing enum
- Loading branch information
Showing
3 changed files
with
18 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -21,6 +21,7 @@ jobs: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -39,6 +40,21 @@ jobs: | |
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) | ||
shell: Rscript {0} | ||
|
||
- name: Save artifact | ||
if: ${{ github.event_name == 'pull_request' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: pkgdown-site | ||
path: ./docs | ||
retention-days: 7 | ||
|
||
- name: Post to PR | ||
uses: CDCgov/cfa-actions/[email protected] | ||
if: ${{ github.event_name == 'pull_request' }} | ||
with: | ||
artifact-name: pkgdown-site | ||
gh-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Deploy to GitHub pages 🚀 | ||
if: github.event_name != 'pull_request' | ||
uses: JamesIves/[email protected] | ||
|
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