Skip to content

Commit

Permalink
Create action robust to repos not using renv (#1)
Browse files Browse the repository at this point in the history
* Install deps if renv not used

* Auto-install rmarkdown and yaml pkgs
  • Loading branch information
NeuroShepherd authored Nov 28, 2024
1 parent 0a7a72a commit 3645664
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ jobs:
if: ${{ hashFiles('renv.lock') == ''}}
uses: r-lib/actions/setup-r@v2

- name: Install R latest dependencies
if: ${{ hashFiles('renv.lock') == ''}}
run: |
install.packages("renv")
install.packages("rmarkdown")
install.packages("yaml")
install.packages(renv::dependencies()$Package)
shell: Rscript {0}

- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion TOPIC1/page1.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ The headers below cause the table of contents/dropdown on the right to be visibl

# Level One Again

## Level Two
## Level Two

0 comments on commit 3645664

Please sign in to comment.