Update render-README.yml #4
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
name: Render README.qmd to Markdown | |
on: | |
push: # Trigger on every push to the repository | |
branches: | |
- '**' # Tracks all branches; restrict if needed | |
jobs: | |
render: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
- name: Install R and Required Packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y r-base | |
R_LIBS_USER=$HOME/R/library Rscript -e 'dir.create(Sys.getenv("R_LIBS_USER"), recursive = TRUE); install.packages(c("knitr", "rmarkdown"), repos = "https://cloud.r-project.org/")' | |
- name: Find and Render README.qmd Files | |
run: | | |
# Find all README.qmd files and render them to Markdown | |
find . -name "README.qmd" | while read qmd_file; do | |
quarto render "$qmd_file" --to markdown | |
done |