Skip to content

Commit

Permalink
ci: 定时执行
Browse files Browse the repository at this point in the history
  • Loading branch information
14790897 committed Apr 3, 2024
1 parent 6134567 commit 07bb445
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 73 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/cron_read.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Scheduled Node.js CI

on:
schedule:
# 每天 UTC 时间 00:00 运行
- cron: "0 0 * * *"

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x] # 选择你需要的 Node.js 版本

steps:
- uses: actions/checkout@v3 # 检出你的仓库
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: pnpm i # 安装 package.json 中的依赖项
- name: Run a script
run: node pteer.js # 替换为你想运行的脚本的实际名称
26 changes: 26 additions & 0 deletions .github/workflows/read.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Node.js CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x] # 选择你需要的 Node.js 版本

steps:
- uses: actions/checkout@v3 # 检出你的仓库
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: pnpm i # 安装 package.json 中的依赖项
- name: Run a script
run: node pteer.js # 替换为你想运行的脚本的实际名称
73 changes: 0 additions & 73 deletions puppeteer_c.js

This file was deleted.

0 comments on commit 07bb445

Please sign in to comment.