Update CI workflow to remove caching for Node.js and Python dependencies and change trigger to workflow_dispatch
This commit is contained in:
@ -1,10 +1,7 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -13,24 +10,6 @@ jobs:
|
||||
- name: 检出代码
|
||||
uses: ./.actions/checkout
|
||||
|
||||
# Node.js 缓存
|
||||
- name: 缓存 node_modules
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: platform/node_modules
|
||||
key: node-modules-${{ hashFiles('platform/package-lock.json') }}
|
||||
restore-keys: |
|
||||
node-modules-
|
||||
|
||||
# Python 缓存
|
||||
- name: 缓存 pip
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: pip-cache-${{ hashFiles('back/requirements.txt') }}
|
||||
restore-keys: |
|
||||
pip-cache-
|
||||
|
||||
- name: 安装 Node.js
|
||||
run: |
|
||||
curl -fsSL https://deb.nodesource.com/setup_21.x | bash -
|
||||
|
||||
Reference in New Issue
Block a user