Skip to content

Daily Bookmarks Update #14

Daily Bookmarks Update

Daily Bookmarks Update #14

name: Daily Bookmarks 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: 9.15.0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.4.0'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- 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: 'update bookmark - automated'
branch: daily-bookmark-update
delete-branch: true
title: 'Daily Bookmark Update'
body: |
This PR contains the daily automated bookmark file updates.
*Automated pull request created by GitHub Actions*