douban #516
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
# .github/workflows/douban.yml | |
name: douban | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
watch: | |
types: [started] | |
jobs: | |
douban: | |
name: Douban mark data sync | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: backup data files | |
run: | | |
mv ./_data/book.json ./_data/douban/book_$(date +%Y-%m-%d).json.bak | |
mv ./_data/music.json ./_data/douban/music_$(date +%Y-%m-%d).json.bak | |
mv ./_data/movie.json ./_data/douban/movie_$(date +%Y-%m-%d).json.bak | |
- name: book | |
uses: lizheming/doumark-action@master | |
with: | |
id: conge | |
type: book | |
format: json | |
dir: ./_data | |
- name: movie | |
uses: lizheming/doumark-action@master | |
with: | |
id: conge | |
type: movie | |
format: json | |
dir: ./_data | |
- name: music | |
uses: lizheming/doumark-action@master | |
with: | |
id: conge | |
type: music | |
format: json | |
dir: ./_data | |
- name: Commit | |
uses: EndBug/add-and-commit@v9 | |
with: | |
message: 'chore: update douban data' | |
add: './_data' |