Commit f6ebd397 authored by nanahira's avatar nanahira

ci

parent e64c073a
Pipeline #37680 failed with stages
in 38 seconds
stages:
- build
- deploy
variables:
GIT_DEPTH: "1"
build:
stage: build
dependencies: []
tags:
- linux
script:
- npm ci
- npm run build
artifacts:
paths:
- dist/
deploy_to_server:
stage: deploy
dependencies:
- build
tags:
- linux
variables:
TARGET_HOST: genzakura.yuzurisa.com
TARGET_USER: root
FROM_DIR: ./dist/build/h5/
TARGET_DIR: /data/frontends/tabulator.moecube.com
script:
- apt update && apt -y install openssh-client rsync coreutils
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan "$TARGET_HOST" >> ~/.ssh/known_hosts
- echo "$NANAHIRA_SSH_KEY" | base64 --decode > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/*
- rsync -4cavzP --delete "$FROM_DIR" "$TARGET_USER"@"$TARGET_HOST":"$TARGET_DIR"
only:
- main
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