Skip to content

Commit

Permalink
#184 update workflow to actually push to main
Browse files Browse the repository at this point in the history
  • Loading branch information
manciniedoardo committed Sep 12, 2024
1 parent 21d0b34 commit aa55ce8
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/update_post_dates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,23 @@ jobs:
container:
image: "rocker/tidyverse:4.2.1"
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: main # replace with the branch you want to checkout

- name: Run update_post_dates
run: source("R/update_post_dates.R")
shell: Rscript {0}
run: Rscript R/update_post_dates.R # running the R script with Rscript

- name: Configure Git safe directory
run: git config --global --add safe.directory /__w/blog/blog

- name: Commit results
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "Auto-update blog post date"
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit aa55ce8

Please sign in to comment.