Add Bluesky for Jennifer (#66) #54
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
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 "[email protected]" | |
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" |