-
-
Notifications
You must be signed in to change notification settings - Fork 6
35 lines (33 loc) · 976 Bytes
/
v2ex-fetch.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
name: 'v2ex-fetch'
on:
workflow_dispatch:
push:
branches: [ master, main ]
schedule:
- cron: '5 */4 * * *'
jobs:
fetch-posts:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: npm i
- name: fetch post US
shell: bash
env:
LEANCLOUD_APP_ID: ${{ secrets.US_LEANCLOUD_APP_ID }}
LEANCLOUD_APP_KEY: ${{ secrets.US_LEANCLOUD_APP_KEY }}
LEANCLOUD_MASTER_KEY: ${{ secrets.US_LEANCLOUD_MASTER_KEY }}
run: |
node actions/v2ex/fetch.js