feat(deploy): build standalone server
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
4c5995f166
commit
4bd3b1e094
5 changed files with 20 additions and 6 deletions
13
.drone.yml
13
.drone.yml
|
@ -13,16 +13,19 @@ steps:
|
||||||
image: node-pnpm:16-alpine
|
image: node-pnpm:16-alpine
|
||||||
commands:
|
commands:
|
||||||
- pnpm format:check
|
- pnpm format:check
|
||||||
- name: Build site
|
- name: Build
|
||||||
image: node-pnpm:16-alpine
|
image: node-pnpm:16-alpine
|
||||||
commands:
|
commands:
|
||||||
- pnpm build
|
- pnpm build:site
|
||||||
- name: Deploy site
|
- pnpm build:server
|
||||||
|
- name: Deploy
|
||||||
image: alpine
|
image: alpine
|
||||||
commands:
|
commands:
|
||||||
- apk add curl ca-certificates zip
|
- apk add curl ca-certificates zip
|
||||||
- cd dist && zip -r ../deploy.zip * && cd ..
|
- cd dist && zip -r ../deploy-site.zip * && cd ..
|
||||||
- 'curl --fail --upload-file deploy.zip -H "Authorization: token $GITEA_TOKEN" https://git.ashhhleyyy.dev/api/packages/ash/generic/doodly/$DRONE_COMMIT_SHA/doodly.zip'
|
- cd build && zip -r ../deploy-server.zip * && cd ..
|
||||||
|
- 'curl --fail --upload-file deploy-site.zip -H "Authorization: token $GITEA_TOKEN" https://git.ashhhleyyy.dev/api/packages/ash/generic/doodly/$DRONE_COMMIT_SHA/doodly-site.zip'
|
||||||
|
- 'curl --fail --upload-file deploy-server.zip -H "Authorization: token $GITEA_TOKEN" https://git.ashhhleyyy.dev/api/packages/ash/generic/doodly/$DRONE_COMMIT_SHA/doodly-server.zip'
|
||||||
environment:
|
environment:
|
||||||
GITEA_TOKEN:
|
GITEA_TOKEN:
|
||||||
from_secret: GITEA_TOKEN
|
from_secret: GITEA_TOKEN
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -10,6 +10,7 @@ lerna-debug.log*
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
dist-ssr
|
dist-ssr
|
||||||
|
build
|
||||||
*.local
|
*.local
|
||||||
|
|
||||||
# Editor directories and files
|
# Editor directories and files
|
||||||
|
|
|
@ -17,6 +17,7 @@ pnpm-lock.yaml
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
dist-ssr
|
dist-ssr
|
||||||
|
build
|
||||||
*.local
|
*.local
|
||||||
.next/
|
.next/
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --host 0.0.0.0",
|
"dev": "vite --host 0.0.0.0",
|
||||||
"build": "vite build",
|
"build:site": "vite build",
|
||||||
|
"build:server": "ncc build src/server/main.ts -o build/",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"check": "svelte-check --tsconfig ./tsconfig.json",
|
"check": "svelte-check --tsconfig ./tsconfig.json",
|
||||||
"dev:server": "node --loader ts-node/esm src/server/main.ts",
|
"dev:server": "node --loader ts-node/esm src/server/main.ts",
|
||||||
|
@ -15,6 +16,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/vite-plugin-svelte": "^1.0.1",
|
"@sveltejs/vite-plugin-svelte": "^1.0.1",
|
||||||
"@tsconfig/svelte": "^3.0.0",
|
"@tsconfig/svelte": "^3.0.0",
|
||||||
|
"@vercel/ncc": "^0.34.0",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
"prettier-plugin-svelte": "^2.7.0",
|
"prettier-plugin-svelte": "^2.7.0",
|
||||||
"svelte": "^3.49.0",
|
"svelte": "^3.49.0",
|
||||||
|
|
|
@ -4,6 +4,7 @@ specifiers:
|
||||||
'@fontsource/noto-sans': ^4.5.11
|
'@fontsource/noto-sans': ^4.5.11
|
||||||
'@sveltejs/vite-plugin-svelte': ^1.0.1
|
'@sveltejs/vite-plugin-svelte': ^1.0.1
|
||||||
'@tsconfig/svelte': ^3.0.0
|
'@tsconfig/svelte': ^3.0.0
|
||||||
|
'@vercel/ncc': ^0.34.0
|
||||||
bulma: ^0.9.4
|
bulma: ^0.9.4
|
||||||
prettier: ^2.7.1
|
prettier: ^2.7.1
|
||||||
prettier-plugin-svelte: ^2.7.0
|
prettier-plugin-svelte: ^2.7.0
|
||||||
|
@ -27,6 +28,7 @@ dependencies:
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@sveltejs/vite-plugin-svelte': 1.0.1_svelte@3.49.0+vite@3.0.6
|
'@sveltejs/vite-plugin-svelte': 1.0.1_svelte@3.49.0+vite@3.0.6
|
||||||
'@tsconfig/svelte': 3.0.0
|
'@tsconfig/svelte': 3.0.0
|
||||||
|
'@vercel/ncc': 0.34.0
|
||||||
prettier: 2.7.1
|
prettier: 2.7.1
|
||||||
prettier-plugin-svelte: 2.7.0_o3ioganyptcsrh6x4hnxvjkpqi
|
prettier-plugin-svelte: 2.7.0_o3ioganyptcsrh6x4hnxvjkpqi
|
||||||
svelte: 3.49.0
|
svelte: 3.49.0
|
||||||
|
@ -1449,6 +1451,11 @@ packages:
|
||||||
resolution: {integrity: sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==}
|
resolution: {integrity: sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/@vercel/ncc/0.34.0:
|
||||||
|
resolution: {integrity: sha512-G9h5ZLBJ/V57Ou9vz5hI8pda/YQX5HQszCs3AmIus3XzsmRn/0Ptic5otD3xVST8QLKk7AMk7AqpsyQGN7MZ9A==}
|
||||||
|
hasBin: true
|
||||||
|
dev: true
|
||||||
|
|
||||||
/accepts/1.3.8:
|
/accepts/1.3.8:
|
||||||
resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==}
|
resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==}
|
||||||
engines: {node: '>= 0.6'}
|
engines: {node: '>= 0.6'}
|
||||||
|
|
Loading…
Reference in a new issue