Skip to content

Fetch and Save Trending #5

Fetch and Save Trending

Fetch and Save Trending #5

Workflow file for this run

name: Fetch and Save Trending
on:
schedule:
- cron: '0 12 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
build:
name: Fetech and Save Trending
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install pnpm
run: npm i pnpm -g
- name: Install Dependencies
run: pnpm install
- name: Run Scripts
run: pnpm start
env:
MASTODON_ENABLED: ${{ vars.MASTODON_ENABLED }}
MASTODON_URL: ${{ vars.MASTODON_URL }}
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
- name: Publish
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add data
git commit -m "Fetch latest trending"
git push