Skip to content

feat(render-readme): render nunjucks templates #2

feat(render-readme): render nunjucks templates

feat(render-readme): render nunjucks templates #2

Workflow file for this run

on:
workflow_call:
inputs:
run:
type: boolean
default: true
branch_name:
type: string
required: true
jobs:
render:
if: ${{ inputs.run }}
name: 📖 README
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Setup Pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Install rmarkdown
run: Rscript -e 'install.packages("rmarkdown")'
- name: Setup Node.Js
uses: actions/setup-node@v3
- name: Install nunjucks
run: npm install nunjucks
- name: Resolve nunjucks templates
run: echo "require('nunjucks'); var res = nunjucks.render("README.Rmd", {repo: '${{ github.event.repository.name }}'}); console.log(res)" | node

Check failure on line 40 in .github/workflows/render-readme.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/render-readme.yaml

Invalid workflow file

You have an error in your yaml syntax on line 40
- name: Render README
run: Rscript -e 'rmarkdown::render("README.Rmd")'
- name: Commit and push changes
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git switch ${{ inputs.branch_name }}
git commit README.md -m 'docs(README): Re-build README.Rmd' || echo "No changes to commit"
git push