social-blogdown #1
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: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 12 * * 0' | |
name: social-blogdown | |
jobs: | |
fetch-tweets: | |
runs-on: macOS-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@HEAD | |
- uses: r-lib/actions/setup-r@HEAD | |
- name: Cache R packages | |
uses: actions/cache@HEAD | |
with: | |
path: ${{ env.R_LIBS_USER }} | |
key: ${{ runner.os }}-${{ github.run_id }} | |
restore-keys: ${{ runner.os }}- | |
- name: Fetch Messages | |
run: | | |
Rscript R/fetch.R | |
- name: Push results | |
run: | | |
git add --all * | |
git commit -m"Weekly update" | |
git push -q https://${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:master |