try prod CI
This commit is contained in:
parent
9ca6735dc1
commit
59ed5bdb93
1 changed files with 6 additions and 30 deletions
|
|
@ -1,41 +1,17 @@
|
|||
stages:
|
||||
- build and deploy
|
||||
|
||||
# build and deploy:
|
||||
# stage: build and deploy
|
||||
# only:
|
||||
# - main
|
||||
# image: node:latest
|
||||
# before_script:
|
||||
# - apt-get update -qq && apt-get install -y -qq lftp
|
||||
# script:
|
||||
# - npm install
|
||||
# - npm run build
|
||||
# - |
|
||||
# cd dist
|
||||
# lftp -c "
|
||||
# set ftp:ssl-allow no;
|
||||
# open -u $USERNAME,$PASSWORD $HOST;
|
||||
# mirror --reverse --verbose --ignore-time --parallel=10 \
|
||||
# -x 'accounts/' \
|
||||
# -x 'cache/' \
|
||||
# -x 'sessions/' \
|
||||
# site site;
|
||||
# mirror --reverse --verbose --ignore-time --parallel=10 \
|
||||
# assets assets;
|
||||
# quit"
|
||||
build and deploy:
|
||||
stage: build and deploy
|
||||
only:
|
||||
- main
|
||||
image: node:latest
|
||||
before_script:
|
||||
- apt-get update -qq && apt-get install -y sshpass
|
||||
- apt-get update -qq && apt-get install -y rsync sshpass
|
||||
script:
|
||||
- echo "test" > test.txt
|
||||
- npm install
|
||||
- npm run build
|
||||
- |
|
||||
sshpass -p "$PASSWORD" sftp -o StrictHostKeyChecking=no $USERNAME@$HOST <<EOF
|
||||
cd $PROD_PATH
|
||||
put test.txt
|
||||
bye
|
||||
EOF
|
||||
sshpass -p "$PASSWORD" rsync -avz --delete \
|
||||
-e "ssh -o StrictHostKeyChecking=no" \
|
||||
dist/ $USERNAME@$HOST:$PROD_PATH
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue