fix: workflows #292
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: Node CI | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 10 * * 1' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: checkout result | |
uses: actions/checkout@v2 | |
with: | |
repository: 'clverpanda/clverpanda.github.io' | |
fetch-depth: 0 | |
token: ${{ secrets.ACCESS_TOKEN }} | |
path: './result' | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2-beta | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: npm install&generate | |
run: | | |
npm install | |
npm run generate:like | |
npm run generate:list | |
env: | |
CI: true | |
- name: Commit files | |
run: | | |
cd result/ | |
git add bangumi.ics | |
git add bangumi_list.json | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git commit -m "Update Bangumi" -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.ACCESS_TOKEN }} | |
repository: 'clverpanda/clverpanda.github.io' | |
directory: './result' |