Compare commits

...

2 Commits

Author SHA1 Message Date
ab15fcf568 完善本地测试发布流程
Some checks failed
CI / Docker-Build (push) Failing after 32m28s
2024-03-20 21:57:05 +08:00
33fc91f9de 测试命令 2024-03-20 15:14:07 +08:00

View File

@ -14,9 +14,9 @@ jobs:
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
@ -28,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 }}."