-
Notifications
You must be signed in to change notification settings - Fork 188
68 lines (55 loc) · 1.57 KB
/
server.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: RSS Runner
run-name: 'Runner #${{ github.run_number }} ${{ inputs.suffix }}'
on:
workflow_dispatch:
inputs:
suffix:
description: 'Input suffix'
required: false
type: string
schedule:
- cron: '0 */2 * * *'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 9
run_install: false
- name: Use node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'pnpm'
cache-dependency-path: server/pnpm-lock.yaml
- name: Get pnpm cache directory
id: pnpm-store-path
shell: bash
run: echo "dir=$(pnpm store path)" >> ${GITHUB_OUTPUT}
- name: Cache modules
id: pnpm-cache
uses: actions/cache@v3
with:
path: |
${{ steps.pnpm-store-path.outputs.dir }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install npm dependencies
working-directory: ./server
run: pnpm install
- name: Run npm scripts
working-directory: ./server
env:
WORKFLOW: true
RSS_CONFIG: ${{ secrets.RSS_CONFIG }}
run: pnpm run once
- name: Commit all changed files
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: update by action runner https://github.com/ChanceYu/front-end-rss/actions/runs/${{ github.run_id }}