-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (34 loc) · 1.04 KB
/
daily.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
name: daily trending check
on:
schedule:
- cron: "0 13 * * *"
workflow_dispatch:
jobs:
fetch-and-update:
name: update
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-go@v5
with:
go-version-file: './go.mod'
cache: true
- uses: actions/setup-node@v4
with:
node-version: current
- run: |
go run main.go
git add datum.json
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/"${GITHUB_REPOSITORY}".git
git commit -m "update"
git push origin HEAD
- run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
yarn install
yarn deploy:ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}