Skip to content

Render README.qmd files to gfm #69

Render README.qmd files to gfm

Render README.qmd files to gfm #69

Workflow file for this run

name: Render README.qmd to Markdown
on:
push:
branches:
- main
jobs:
render:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.RENDER_KEY }}
- name: Set up SSH for Git
run: |
mkdir -p ~/.ssh
echo "${{ secrets.RENDER_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
- name: Set up R
uses: r-lib/actions/setup-r@v2
- name: Install Required R Packages
run: |
Rscript -e 'if (!requireNamespace("rmarkdown", quietly = TRUE)) install.packages("rmarkdown", repos = "https://cloud.r-project.org/")'
Rscript -e 'if (!requireNamespace("knitr", quietly = TRUE)) install.packages("knitr", repos = "https://cloud.r-project.org/")'
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Find and Render README.qmd Files
run: |
find . -name "README.qmd" | while read qmd_file; do
quarto render "$qmd_file" --to gfm
done
- name: Commit and Push Rendered Files
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Render README.qmd files to gfm" || echo "No changes to commit"
git fetch origin
# Push changes via SSH with deployment key
git push origin main