speed up build

This commit is contained in:
david
2026-03-19 00:37:23 +01:00
parent ed510247ee
commit fdbc226bae
5 changed files with 1431 additions and 6 deletions

View File

@@ -11,6 +11,9 @@ jobs:
contents: read
packages: write
env:
IMAGE: ghcr.io/apex-fusion/web3-mcp
steps:
- uses: actions/checkout@v4
@@ -39,8 +42,8 @@ jobs:
context: .
push: true
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.sha }}
${{ env.IMAGE }}:latest
${{ env.IMAGE }}:${{ github.sha }}
- name: Deploy to Hetzner VM
run: |
@@ -49,7 +52,7 @@ jobs:
ssh -i /tmp/deploy_key -o StrictHostKeyChecking=no \
${{ secrets.HETZNER_USER }}@${{ secrets.HETZNER_HOST }} \
"echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin && \
docker pull ghcr.io/${{ github.repository }}:${{ github.sha }} && \
docker pull ${{ env.IMAGE }}:${{ github.sha }} && \
docker stop vector-mcp || true && \
docker rm vector-mcp || true && \
docker run -d \
@@ -57,5 +60,5 @@ jobs:
--restart unless-stopped \
-p 122.0.0.1:3000:3000 \
--env-file /etc/vector-mcp/env \
ghcr.io/${{ github.repository }}:${{ github.sha }}"
${{ env.IMAGE }}:${{ github.sha }}"
rm /tmp/deploy_key

1408
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,8 @@
},
"scripts": {
"clean": "rm -rf build",
"build": "npm run clean && NODE_OPTIONS='--max-old-space-size=12288' tsc && chmod +x build/index.js",
"build": "tsup && chmod +x build/index.js",
"typecheck": "tsc --noEmit --incremental",
"start": "node build/index.js"
},
"files": [
@@ -50,6 +51,7 @@
},
"devDependencies": {
"@types/node": "^22.13.1",
"tsup": "^8.5.1",
"typescript": "^5.7.3"
}
}

View File

@@ -11,7 +11,8 @@
"rootDir": "src",
"allowJs": true,
"checkJs": false,
"resolveJsonModule": true
"resolveJsonModule": true,
"incremental": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "build"]

11
tsup.config.ts Normal file
View File

@@ -0,0 +1,11 @@
import { defineConfig } from "tsup";
export default defineConfig({
entry: ["src/index.ts"],
format: ["esm"],
target: "es2020",
outDir: "build",
clean: true,
splitting: false,
banner: { js: "#!/usr/bin/env node" },
});