This commit is contained in:
heixinyouzi 2024-10-25 20:53:07 +08:00
commit a2bf357fd0

View File

@ -20,6 +20,7 @@ jobs:
with:
# gitea-tool-cache导出 node 具体版本
node-version: ${{ steps.tool-cache.outputs.node-version }}
registry-url: https://registry.npmmirror.com
- name: 缓存
uses: https://gitea.cn/actions/cache@v4
@ -28,12 +29,21 @@ jobs:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: 判断yarn是否安装,如果未安装则安装
run: |
if ! command -v yarn &> /dev/null; then
echo "yarn 未安装,开始安装"
npm install -g yarn
else
echo "yarn 已安装"
fi
- name: Install and Build # 下载依赖 打包项目
run: |
yarn install
yarn build
- name: Appleboy
uses: https://gitcode.net/weixin_44697517/scp-action@v0.1.4
uses: https://gitee.com/liushuai05/scp-action@v0.1.7
with:
host: ${{ secrets.USER_HOST }} # 服务器地址: xxx.xxx.xxx.xxx
username: ${{ secrets.USER_NAME }} # 服务器名字 一般是root