Skip to content

Daily Bookmarks Update #7

Daily Bookmarks Update

Daily Bookmarks Update #7

name: Daily JSON Update
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
update-json:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8.6.0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.4.0'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run update script
env:
READWISE_READER_API_KEY: ${{ secrets.READWISE_READER_API_KEY }}
run: pnpx tsx ./scripts/generate-bookmarks-reader.ts
- name: Check for changes
id: git-check
run: |
git add ./src
git diff --staged --quiet || echo "changes=true" >> $GITHUB_OUTPUT
- name: Create Pull Request
if: steps.git-check.outputs.changes == 'true'
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GH_TOKEN }}
commit-message: 'chore: daily JSON update'
branch: daily-json-update
delete-branch: true
title: 'Daily JSON Update'
body: |
This PR contains the daily automated JSON file updates.
*Automated pull request created by GitHub Actions*