feat: refactor feeds; reduce dependencies

This commit is contained in:
Cory Dransfeldt 2024-04-17 14:07:43 -07:00
parent 4067148658
commit d768007f1c
No known key found for this signature in database
375 changed files with 2568 additions and 13971 deletions

View file

@ -1,26 +0,0 @@
name: Blog posts to readme
on:
workflow_dispatch:
schedule:
- cron: '0 15 * * *'
jobs:
pull_blog_rss:
name: Update with latest blog posts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get RSS Feed
uses: kohrongying/readme-the-rss@master
with:
feed_url: https://coryd.dev/feeds/posts
count: 5
- name: Commit file changes
run: |
git config --global user.name 'cdransf'
git config --global user.email 'coryd@hey.com'
git add .
git diff --quiet --cached || git commit -m "Update README"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_TOKEN }}

57
.github/workflows/reading.yaml vendored Normal file
View file

@ -0,0 +1,57 @@
name: Update book
run-name: Book (${{ inputs.isbn }})
permissions:
contents: write
on:
workflow_dispatch:
inputs:
isbn:
description: The book's ISBN. Required.
required: true
type: string
notes:
description: Notes about the book. Optional.
type: string
rating:
description: Rate the book. Optional.
type: choice
default: "unrated"
options:
- "unrated"
- ⭐️
- ⭐️⭐️
- ⭐️⭐️⭐️
- ⭐️⭐️⭐️⭐️
- ⭐️⭐️⭐️⭐️⭐️
# Tags are optional.
tags:
description: Add tags to categorize the book. Separate each tag with a comma. Optional.
type: string
# If you do not submit date-started or date-finished, the book status will be set to "want to read"
date-started:
description: Date you started the book (YYYY-MM-DD). Optional.
type: string
date-finished:
description: Date you finished the book (YYYY-MM-DD). Optional.
type: string
jobs:
update-library:
runs-on: macOS-latest
name: Read
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Read
uses: katydecorah/read-action@v7.1.0
with:
filename: src/_data/json/read.json
time-zone: America/Los_Angeles
- name: Commit updated read file
run: |
git pull
git config --local user.email "coryd@hey.com"
git config --local user.name "Cory Dransfeldt"
git add -A && git commit -m "📚 “${{ env.BookTitle }}” (${{ env.BookStatus }})"
git push

View file

@ -1,22 +0,0 @@
name: Scheduled post to Bluesky
on:
workflow_dispatch:
schedule:
- cron: '0 */2 * * *'
jobs:
Feed2SocialMedia:
runs-on: ubuntu-latest
steps:
- name: Feed to social media
uses: lwojcik/github-action-feed-to-social-media@v2
with:
feedUrl: 'https://feedpress.me/coryd'
newestItemStrategy: 'latestDate'
postFormat: "📝: {title} {link}"
# Bluesky settings
blueskyEnable: true
blueskyPostFormat: "📝: {title} {link}"
blueskyHandle: 'cdransf.bsky.social'
blueskyAppPassword: ${{ secrets.BLUESKY_TOKEN }}
blueskyOwnerHandle: 'cdransf.bsky.social'
blueskyOwnerContact: 'coryd@hey.com'

View file

@ -1,22 +0,0 @@
name: Scheduled follow feed to Mastodon
on:
workflow_dispatch:
schedule:
- cron: '0 */2 * * *'
jobs:
JSONFeed2Mastodon:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Feed to Mastodon
uses: nhoizey/github-action-feed-to-mastodon@v2
with:
feedUrl: "https://coryd.dev/feeds/share-follow.json"
mastodonInstance: "https://social.lol"
mastodonToken: ${{ secrets.MASTODON_TOKEN }}
globalDelayToots: 0
- name: Pull any changes from Git
run: git pull
- name: Commit and push
uses: stefanzweifel/git-auto-commit-action@v4