daily trending check #868
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: daily trending check | |
on: | |
schedule: | |
- cron: "0 13 * * *" | |
workflow_dispatch: | |
jobs: | |
fetch-and-update: | |
name: update | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: './go.mod' | |
cache: true | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: current | |
- run: | | |
go run main.go | |
git add datum.json | |
git config user.email "github-actions@github.com" | |
git config user.name "github-actions" | |
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 }} |