-
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (33 loc) · 958 Bytes
/
fetch.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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