ci: avoid installing node in deployment runner
Verify mini program and deploy preview / verify-deploy (push) Failing after 29s

This commit is contained in:
2026-09-18 22:21:36 +08:00
parent 425a068a63
commit dddaa80c74
2 changed files with 21 additions and 3 deletions
+3 -3
View File
@@ -5,7 +5,7 @@ on:
pull_request:
concurrency:
group: rice-pk-xhs-production
cancel-in-progress: false
cancel-in-progress: true
jobs:
verify-deploy:
runs-on: ubuntu-latest
@@ -22,7 +22,7 @@ jobs:
env: { SOURCE_TOKEN: "${{ secrets.GITEA_TOKEN || gitea.token }}" }
run: |
set -eu
apk add --no-cache python3 nodejs npm curl
apk add --no-cache python3 curl
python3 - <<'PY'
import io,os,shutil,tarfile,tempfile,urllib.request
from pathlib import Path
@@ -34,7 +34,7 @@ jobs:
roots=list(Path(d).iterdir());shutil.copytree(roots[0],Path.cwd(),dirs_exist_ok=True)
PY
- name: Check source and preview
run: npm run check
run: python3 scripts/check.py
- name: Build preview image
run: docker build -t "rice-pk-xhs:$SOURCE_REVISION" .
- name: Update permanent preview container
+18
View File
@@ -0,0 +1,18 @@
import json
from pathlib import Path
required = [
"app.js",
"app.json",
"pages/index/index.xhsml",
"pages/test/test.js",
"pages/result/result.js",
"web/index.html",
"web/app.js",
]
missing = [name for name in required if not Path(name).is_file()]
if missing:
raise SystemExit("Missing required files: " + ", ".join(missing))
json.loads(Path("app.json").read_text())
print(f"Static checks passed ({len(required)} required files).")