Get Home Latest Timeline #2451
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Get Home Latest Timeline | |
on: | |
schedule: | |
- cron: '*/30 * * * *' # 每30分钟运行 | |
workflow_dispatch: # 允许手动触发 | |
jobs: | |
update-data: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GH_TOKEN }} # 使用你设置的 secret | |
- name: Setup Git | |
run: | | |
git config --global user.name 'GitHub Actions Bot' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Install dependencies | |
run: bun install | |
- name: Run fetch script | |
env: | |
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }} | |
run: bun run scripts/fetch-tweets.ts | |
- name: Commit and push changes | |
run: | | |
git add . | |
git commit -m "chore: update user data [skip ci]" || exit 0 | |
git push |