使用 docker 下的node 打包
Some checks failed
Build and Deploy / build (push) Failing after 2m23s

This commit is contained in:
cheney 2026-04-16 10:55:09 +08:00
parent 5751ac05a2
commit 8d9eef8c97

View File

@ -11,20 +11,13 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container:
image: node:24-alpine
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check Node.js version
run: node --version
- name: Install dependencies
run: npm install --registry=https://registry.npmmirror.com
- name: Build project
run: npm run build
- name: Install dependencies and build
run: |
docker run --rm -v "${PWD}:/app" -w /app node:24-alpine sh -c "npm install --registry=https://registry.npmmirror.com && npm run build"
- name: Deploy to server
uses: appleboy/scp-action@v0.1.7