Visit Websites Every Day #301
This file contains hidden or 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: Visit Websites Every Day | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' # 每天 00:00 UTC (北京时间 08:00) | |
| - cron: '0 12 * * *' # 每天 12:00 UTC (北京时间 20:00) | |
| workflow_dispatch: # 支持手动触发 | |
| jobs: | |
| visit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install Playwright | |
| run: npm install playwright | |
| - name: Install browsers | |
| run: npx playwright install --with-deps | |
| - name: Run visitWebsite.js | |
| run: node ./visit-website/visitWebsite.js |