Skip to content

Render README

Render README #1684

Workflow file for this run

on:
workflow_dispatch:
push:
branches:
- main
paths:
- README.Rmd
- .github/workflows/main.yml
schedule:
- cron: '0 12 * * *'
name: Render README
jobs:
render:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
name: Render README
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Prepare repository
run: git checkout "${GITHUB_REF:11}"
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 5
- name: Render README
run: Rscript -e 'rmarkdown::render("README.Rmd", output_format = "github_document", params = list(AIRTABLE_API_KEY = ${{ secrets.AIRTABLE_API_KEY }}))'
env: # Set the secrets as an input
AIRTABLE_API_KEY: ${{ secrets.AIRTABLE_API_KEY }}
AIRTABLE_ID: ${{ secrets.AIRTABLE_ID }}
- name: Commit results
run: |
git commit README.md -m 'Re-build README.Rmd' || echo "No changes to commit"
git push https://${{github.actor}}:${{secrets.GITHUB_TOKEN}}@github.com/${{github.repository}}.git HEAD:${{ github.ref }} || echo "No changes to commit"