-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (37 loc) · 1.12 KB
/
twoot.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
37
38
39
name: twoot on a schedule
on:
workflow_dispatch:
schedule:
- cron: "12 2,5,8,11,14,17,20,23 * * *"
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
# disjoint branch with "unused concept" data
ref: "data"
path: "data_repo"
- uses: pnpm/action-setup@18ac635edf3d6cd3e88d281bceecc25c4dbc1e73
- uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- run: pnpm start
env:
DATA_DIR: "data_repo"
NODE_ENV: "production"
MASTODON_TOKEN: ${{ secrets.MASTODON_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
- name: Commit and push if changed
run: |-
cd data_repo
git config user.name "Automated"
git config user.email "[email protected]"
git add -A
timestamp=$(date -u)
git commit -m "Latest data: ${timestamp}" || exit 0
git push