-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Add a workflow to check that a package down site can be built #120
Comments
Thanks @kellijohnson-NOAA! I think this would be possible by using Here is the start for the reusable workflow (not tested yet) # Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
workflow_call:
name: build-pkgdown
jobs:
pkgdown:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website
- name: build pkgdown
run: |
Rscript -e 'pkgdown::build_site()'
#save pkgdown output
- uses: actions/upload-artifact@v4
with:
name: pkgdown-site
path: docs/
|
Thanks, Kathryn, this looks great. I'd be happy to reuse the workflow and test it with FIMS on pull request if you need a tester. |
Thanks @k-doering-NOAA for working on this so quickly. I am curious @Bai-Li-NOAA when I broke the FIMS site, how did you know? Did you have to look at something manually? Or, were there messages returned from |
@kellijohnson-NOAA, I often encounter similar issues when updating R functions in other projects, so I suspected there might be problems with building the pkgdown site after noticing that a few R functions were removed from the FIMS repo. And yes, I ran |
@Bai-Li-NOAA, it would be great to have you test! I'll let you know once I put the reusable version on a branch. Good to know that |
Is your feature request related to a problem? Please describe.
I sometimes make changes to the code, like removing a function, and then forget that there may be changes needed to the package down site like removing the function from a list of grouped functions.
Describe the solution you would like.
Is there a way to add a workflow that just checks if a package down site builds successfully? That way, the new workflow could be used in tests run when checking Pull Requests because we do not actually want the built site to be deployed.
Describe alternatives you have considered
Additional context
See this issue in FIMS, where I did not make the necessary changes to the package down site and @Bai-Li-NOAA caught my error when reviewing a pull request.
The text was updated successfully, but these errors were encountered: