shortcut_trigger #4
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: shortcut trigger | |
on: | |
repository_dispatch: | |
types: [shortcut_trigger] | |
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: | | |
echo ${{ github.event.client_payload.like_list }} | |
npm install | |
npm run generate:like | |
env: | |
CI: true | |
- name: Commit files | |
run: | | |
cd result/ | |
git add . | |
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' |