Skip to content

Add Mariatta's Website (#58) #48

Add Mariatta's Website (#58)

Add Mariatta's Website (#58) #48

Workflow file for this run

on:
push:
branches:
- main
# pull_request:
# types:
# - closed
jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: macOS-latest
steps:
- run: |
echo The PR was merged
- name: Install R dependencies
run: |
install.packages(c("jsonlite", "jsonvalidate", "rmarkdown", "reticulate", "here"),
repos = "https://cloud.r-project.org/")
shell: Rscript {0}
- name: Install Python dependencies
uses: py-actions/py-dependency-install@v4
- name: Render readme files
#if: github.event_name == 'push'
run: rmarkdown::render("README.Rmd", output_format = "github_document")
shell: Rscript {0}
- name: Commit data
#if: github.event_name == 'push'
env:
GITHUB_PAT: ${{ secrets.SECRET_WRITE }}
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git commit blogs/ -m 'Commit cleaned jsons' || echo "No changes to commit"
git commit README.md -m 'Re-knit readme files' || echo "No changes to commit"
git push origin || echo "Nothing to push"