diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 39b3d1de..ccc3fe8a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,11 +13,25 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + # 安装 Node.js 和 npm + - name: Install Node.js and npm + uses: actions/setup-node@v2.1.5 + with: + node-version: '14' + + # 安装 vte 和其他前端依赖 + - name: Install frontend dependencies + working-directory: ./client + run: | + npm install vite -g + npm install + env: + NODE_ENV: production + # 前端构建步骤 - name: Build Vue App working-directory: ./client run: | - npm install npm run build env: NODE_ENV: production @@ -38,8 +52,7 @@ jobs: working-directory: ./server run: | npm install - npm run build - npm start & + npm run start & env: NODE_ENV: production