Skip to content

.github/workflows/blog-posts.yml #13

.github/workflows/blog-posts.yml

.github/workflows/blog-posts.yml #13

Workflow file for this run

name: Blog Posts
on:
workflow_dispatch:
schedule:
- cron: "35 0 * * *" # 6:05 AM IST
jobs:
update-posts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update post list
run: |
cd scripts && npm install && ACCESS_TOKEN=${{ secrets.ACCESS_TOKEN }} npm run get:posts
- name: Commit changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -A
git diff-index --quiet HEAD || git commit -m "Update blog posts"
- name: Pull changes
run: git pull -r
- name: Push changes
uses: ad-m/github-push-action@d91a481090679876dfc4178fef17f286781251df
with:
github_token: ${{ secrets.ACCESS_TOKEN }}