ci: switch to node:20-slim and fix YAML indentation
ci/woodpecker/push/woodpecker Pipeline failed

Fix CI failure caused by YAML indentation issues and missing SSH client.

Changes:
1. Fix YAML indentation for build-and-deploy step
2. Switch from node:20-alpine to node:20-slim
3. Update SSH installation commands for Debian-based system
4. Add SSH client availability check

Benefits:
- node:20-slim may already include SSH client
- If not, uses apt-get instead of apk for installation
- Better compatibility with deployment tools

This should resolve the 'No pipeline steps available!' error.
This commit is contained in:
张翔
2026-03-30 11:41:07 +08:00
parent a314b5c370
commit 4761850502
+5 -4
View File
@@ -1,5 +1,5 @@
variables:
- &node_image node:20-alpine
- &node_image node:20-slim
steps:
install-deps:
@@ -112,7 +112,7 @@ steps:
- dev
build-and-deploy:
image: node:20-alpine
image: *node_image
environment:
NODE_ENV: production
NEXT_TELEMETRY_DISABLED: 1
@@ -123,8 +123,9 @@ steps:
- lint
- type-check
commands:
- echo "Installing SSH client"
- apk add --no-cache openssh-client rsync
- echo "Checking SSH client availability"
- which ssh && echo "SSH client found" || echo "Installing SSH client"
- apt-get update && apt-get install -y openssh-client rsync
- echo "Building production artifacts"
- npm run build
- echo "Build completed"