添加线上持续发布gitea action
This commit is contained in:
parent
f4ddd7b2be
commit
db1f8e64e7
26
.gitea/workflows/CD_pub_deploy.yaml
Normal file
26
.gitea/workflows/CD_pub_deploy.yaml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
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/
|
Loading…
Reference in New Issue
Block a user