Commit a4f28261 authored by Chunchi Che's avatar Chunchi Che

Merge branch 'feat/deploy' into 'main'

Feat/deploy

See merge request mycard/Neos!106
parents 80659000 3ae6ce56
Pipeline #20261 passed with stages
in 7 minutes and 11 seconds
...@@ -33,4 +33,31 @@ npm_build: ...@@ -33,4 +33,31 @@ npm_build:
tags: tags:
- linux - linux
script: npm run build script: npm run build
artifacts:
paths:
- dist
deploy:
stage: deploy
tags:
- linux
only:
- main
dependencies:
- npm_build
script:
- sudo apt-get install rsync
- 'rsync -atv --progress --human-readable dist/ kirayamato@8.142.104.5:$NEOS_DEPLOY_PATH'
- 'rsync -atv --progress --human-readable assets/ kirayamato@8.142.104.5:$NEOS_DEPLOY_PATH/assets'
- 'rsync -atv --progress --human-readable ygopro-database kirayamato@8.142.104.5:$NEOS_DEPLOY_PATH/ygopro-database'
before_script:
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- ssh-add <(echo "$NEOS_SSH_PRIVATE_KEY" | base64 -d)
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- chmod 700 ~/.ssh
...@@ -37,7 +37,7 @@ export interface sqliteResult { ...@@ -37,7 +37,7 @@ export interface sqliteResult {
let YGODB: Database | null = null; let YGODB: Database | null = null;
const sqlPromise = initSqlJs({ const sqlPromise = initSqlJs({
locateFile: (file) => `/node_modules/sql.js/dist/${file}`, locateFile: (file) => `/assets/${file}`,
}); });
// FIXME: 应该有个返回值,告诉业务方本次请求的结果,比如初始化DB失败 // FIXME: 应该有个返回值,告诉业务方本次请求的结果,比如初始化DB失败
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment