27 lines
1.0 KiB
YAML
27 lines
1.0 KiB
YAML
|
name: 公网服务发布
|
||
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions
|
||
|
on:
|
||
|
release:
|
||
|
types: [published]
|
||
|
|
||
|
jobs:
|
||
|
Download-And-Deploy-Release:
|
||
|
runs-on: joylink-local233
|
||
|
steps:
|
||
|
- name: 发布到正式环境1
|
||
|
uses: https://gitea.joylink.club/appleboy/ssh-action@v1.0.3
|
||
|
with:
|
||
|
host: ${{ secrets.PUB1_DOMAIN_SSH_HOST }}
|
||
|
port: ${{ secrets.PUB1_DOMAIN_SSH_PORT }}
|
||
|
username: ${{ secrets.PUB1_DOMAIN_SSH_USER }}
|
||
|
password: ${{ secrets.PUB1_DOMAIN_SSH_PASSWORD }}
|
||
|
script: |
|
||
|
release=${{ github.event.release.tag_name }}
|
||
|
asset_url=${{ github.event.release.assets[0].browser_download_url }}
|
||
|
echo "Release is: $release, asset_download_url is: $asset_url"
|
||
|
mkdir -p ./downloads
|
||
|
wget -O ./downloads/target.tar $asset_url
|
||
|
mkdir -p /usr/local/joylink/client/gdtraining
|
||
|
rm -rf /usr/local/joylink/client/gdtraining/*
|
||
|
tar xv --strip 1 -f ./downloads/target.tar -C /usr/local/joylink/client/gdtraining/
|