Skip to content

Commit

Permalink
Update view counts with scheduled job
Browse files Browse the repository at this point in the history
  • Loading branch information
cv4x committed Jul 25, 2024
1 parent 3ff1b81 commit fb602e9
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
push:
branches:
- main
workflow_run:
workflows: [ view-counts ]
types:
- completed

concurrency: # prevent concurrent deploys doing strange things
group: build-and-push
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/view-counts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: view-counts

on:
schedule:
- cron: "40 3 * * *"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Install deps and run job
working-directory: ./json/voices
run: |
npm i
npm start
- name: Commit file
run: |
git add ./json/voices
git commit -m "Update view counts"
git push

0 comments on commit fb602e9

Please sign in to comment.