-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.05 KB
/
node.js.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Update README.md
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '30 22 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup Timezone
uses: szenius/set-timezone@v1.0
with:
timezoneLinux: 'Asia/Shanghai'
timezoneMacos: "Asia/Shanghai"
timezoneWindows: "Asia/Shanghai"
- name: Checkout
uses: actions/checkout@v3
- name: Configure Environment
uses: actions/setup-node@v3
with:
node-version: '16.x'
cache: 'npm'
- name: Push Cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-js-${{ hashFiles('package-lock.json') }}
- name: Install Dependencies
run: npm install
- name: Generate README.md
run: npm run build --if-present
- name: Push new README.md
uses: mikeal/publish-to-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.PUSHTOKEN }}
BRANCH_NAME: 'main'