Skip to content

Sync AI Knowledge Data from Yobi #35

Sync AI Knowledge Data from Yobi

Sync AI Knowledge Data from Yobi #35

Workflow file for this run

name: Sync AI Knowledge Data from Yobi
on:
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fetch data from Yobi
run: |
mkdir -p api projects
curl -sf https://yobi.tw93.fun/llms-full.txt -o llms-full.txt
curl -sf https://yobi.tw93.fun/api/profile -o api/profile.json
curl -sf https://yobi.tw93.fun/api/projects -o api/projects.json
curl -sf https://yobi.tw93.fun/api/blog -o api/blog.json
curl -sf https://yobi.tw93.fun/api/weekly -o api/weekly.json
for slug in pake kaku miaoyan mole waza kami; do
curl -sf "https://yobi.tw93.fun/projects/${slug}" -o "projects/${slug}.md"
done
- name: Commit if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add llms-full.txt api/ projects/
if git diff --cached --quiet; then
echo "No changes to commit"
else
git commit -m "chore: sync AI knowledge data from Yobi"
git push
fi