This commit is contained in:
parent
33fc91f9de
commit
ab15fcf568
@ -9,17 +9,14 @@ jobs:
|
||||
Docker-Build:
|
||||
runs-on: joylink-local233
|
||||
steps:
|
||||
- name: Test cmd
|
||||
run: |
|
||||
scp --help
|
||||
- name: 检出代码
|
||||
uses: https://gitea.joylink.club/actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: 设置node环境
|
||||
uses: https://gitea.joylink.club/actions/setup-node@v4
|
||||
uses: https://gitea.joylink.club/actions/local-setup-node@v0.1.1
|
||||
with:
|
||||
node-version: 18
|
||||
version: 'v18.19.1'
|
||||
cache: 'yarn'
|
||||
cache-dependency-path: 'yarn.lock'
|
||||
- name: 安装yarn,并run build
|
||||
@ -31,18 +28,26 @@ jobs:
|
||||
yarn config set registry https://registry.npmmirror.com
|
||||
yarn
|
||||
yarn run build:test
|
||||
- name: 发布到本地测试环境
|
||||
run: |
|
||||
tar czvf ./dist.tar.gz ./dist
|
||||
ls -lh
|
||||
# uses: https://gitea.joylink.club/appleboy/ssh-action@v1.0.3
|
||||
# with:
|
||||
# host: ${{ secrets.LOCAL_233_SSH_HOST }}
|
||||
# port: ${{ secrets.LOCAL_233_SSH_PORT }}
|
||||
# username: ${{ secrets.LOCAL_233_SSH_USER }}
|
||||
# password: ${{ secrets.LOCAL_233_SSH_PASSWORD }}
|
||||
# script: |
|
||||
# docker rm -f rts-sim-testing-service || echo "rts-sim-testing-service not exist"
|
||||
# docker pull gitea.joylink.club/joylink/rts-sim-testing-service:local-test
|
||||
# docker run --name rts-sim-testing-service --restart=always --network net --ip 192.168.53.191 -d -p 9091:9091 -v /usr/local/joylink/logs/bjrtsts:/logs/bjrtsts gitea.joylink.club/joylink/rts-sim-testing-service:local-test rts-sim-testing-service -config test_local
|
||||
- name: 打包发送到本地测试环境
|
||||
uses: https://gitea.joylink.club/appleboy/scp-action@v0.1.7
|
||||
with:
|
||||
host: ${{ secrets.LOCAL_233_SSH_HOST }}
|
||||
username: ${{ secrets.LOCAL_233_SSH_USER }}
|
||||
password: ${{ secrets.LOCAL_233_SSH_PASSWORD }}
|
||||
port: ${{ secrets.LOCAL_233_SSH_PORT }}
|
||||
source: ./dist.tar.gz
|
||||
target: /home/minio/oss/rts-sim-testing-client/dist-test.tar.gz
|
||||
- name: SSH连接233并解压发布
|
||||
uses: https://gitea.joylink.club/appleboy/ssh-action@v1.0.3
|
||||
with:
|
||||
host: ${{ secrets.LOCAL_233_SSH_HOST }}
|
||||
port: ${{ secrets.LOCAL_233_SSH_PORT }}
|
||||
username: ${{ secrets.LOCAL_233_SSH_USER }}
|
||||
password: ${{ secrets.LOCAL_233_SSH_PASSWORD }}
|
||||
script: |
|
||||
cd /home/minio/oss/rts-sim-testing-client
|
||||
mkdir -p /usr/local/joylink/client
|
||||
rm -rf /usr/local/joylink/client/bjrtss
|
||||
tar xz --strip 1 -C /usr/local/joylink/client/bjrtss -f dist-test.tar.gz
|
||||
- run: echo "This job's status is ${{ job.status }}."
|
||||
|
Loading…
Reference in New Issue
Block a user