Skip to content

Commit

Permalink
ci(actions): add update gist cron job
Browse files Browse the repository at this point in the history
  • Loading branch information
mdluo committed Aug 15, 2020
1 parent 5f34ef8 commit a7b5b14
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/schedule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Update gist
on:
push:
branches:
- master
schedule:
- cron: "0 0 * * *" # Run daily at 00:00
jobs:
update-gist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- run: npm ci
- name: update-gist
env:
GOODREADS_API_KEY: ${{ secrets.GOODREADS_API_KEY }}
GOODREADS_USER_ID: ${{ secrets.GOODREADS_USER_ID }}
GOODREADS_SHELF: ${{ secrets.GOODREADS_SHELF }}
BOOKS_SORT_BY: ${{ secrets.BOOKS_SORT_BY }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GIST_ID: ${{ secrets.GIST_ID }}
run: npm start

0 comments on commit a7b5b14

Please sign in to comment.