Daily JavaScript Script Execution #17
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: Daily JavaScript Script Execution | |
on: | |
schedule: | |
- cron: '0 0 * * *' # 每天午夜执行 | |
jobs: | |
run-script: | |
runs-on: ubuntu-latest | |
env: | |
AUTHORIZATION: ${{ secrets.AUTHORIZATION }} | |
VOTE_ID: ${{ secrets.VOTE_ID }} | |
WECHAT_NOTIFY_KEY: ${{ secrets.WECHAT_NOTIFY_KEY }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '14' | |
- name: Install Dependencies | |
run: npm install | |
- name: Run JavaScript Script | |
run: node vote.js |