[add]测试 #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
tags: | |
description: "Version tags" | |
push: | |
branches: [main] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: pack for Station (@Silicon Valley) | |
run: | | |
cp -r . ../dist | |
rm -rf ../dist/.git | |
rm -rf ../dist/logs | |
rm -rf ../dist/db/.session | |
cp online.env ../dist/.env | |
tar cvfz bug-check.tar.gz -C ../dist/ . | |
- name: Push to Earth (@Beijing) | |
uses: nogsantos/scp-deploy@master | |
with: | |
src: bug-check.tar.gz | |
host: 139.199.30.36 | |
remote: /root/ | |
port: 22 | |
user: root | |
key: ${{ secrets.SSH_KEY }} | |
- name: Distribution | |
uses: appleboy/ssh-action@master | |
with: | |
host: 139.199.30.36 | |
port: 22 | |
username: root | |
key: ${{ secrets.SSH_KEY }} | |
script: rm -rf /data/bug-check && mkdir -p /data/bug-check/logs && cd /data/bug-check && tar xvfz /root/bug-check.tar.gz && supervisorctl reload |