From e13c5fc102ca336a0a2fa5a1769a0e362caee4f9 Mon Sep 17 00:00:00 2001 From: fly6516 Date: Tue, 17 Dec 2024 18:24:35 +0800 Subject: [PATCH] fix nodejs installation --- .gitea/workflows/ci.yaml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 674bc9e..c17b4e5 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -17,11 +17,16 @@ jobs: steps: - name: Install Node.js run: | - apt-get update && apt-get install -y curl - curl -fsSL https://rpm.nodesource.com/setup_20.x | bash - - apt-get install -y nodejs - node -v - npm -v + # 更新 apt 包管理器并安装必要的工具 + apt-get update && apt-get install -y curl gnupg2 lsb-release ca-certificates + + # 安装 Node.js 20.x + curl -fsSL https://deb.nodesource.com/setup_20.x | bash - + apt-get install -y nodejs + + # 验证安装是否成功 + node -v + npm -v - name: Checkout code uses: http://fly6516.synology.me:4000/Gitea_Action/checkout@v2