Skip to content

v2ex-fetch

v2ex-fetch #8871

Workflow file for this run

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