ngbs 4 years ago
parent
commit
97e45f4323
3 changed files with 19 additions and 5 deletions
  1. 2 2
      .github/workflows/deploy.yml
  2. 1 1
      .github/workflows/main.yml
  3. 16 2
      .github/workflows/run.yml

+ 2 - 2
.github/workflows/deploy.yml

@@ -1,6 +1,6 @@
 # This is a basic workflow to help you get started with Actions
 
-name: Test Deploy
+name: Deploy to VPS
 
 # Controls when the workflow will run
 on:
@@ -19,7 +19,7 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-      - name: docker ps
+      - name: Deploy to VPS
         uses: appleboy/ssh-action@master
         with:
           host: ${{ secrets.VPS_SSH_HOSTNAME }}

+ 1 - 1
.github/workflows/main.yml

@@ -1002,7 +1002,7 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-      - name: docker ps
+      - name: Deploy to VPS
         uses: appleboy/ssh-action@master
         with:
           host: ${{ secrets.VPS_SSH_HOSTNAME }}

+ 16 - 2
.github/workflows/run.yml

@@ -1,6 +1,6 @@
 # This is a basic workflow to help you get started with Actions
 
-name: TEST RUN
+name: Run every 60 days
 
 # Controls when the workflow will run
 on:
@@ -12,6 +12,8 @@ on:
 
   # Allows you to run this workflow manually from the Actions tab
   workflow_dispatch:
+  schedule:
+    - cron: "0 23 11 */2 *"
 
 # A workflow run is made up of one or more jobs that can run sequentially or in parallel
 jobs:
@@ -35,4 +37,16 @@ jobs:
           echo "UDP2RAW_VERSION=$(curl -fsSL https://api.github.com/repos/wangyu-/udp2raw-tunnel/releases/latest | grep '"tag_name":' | head -n 1 | sed -E 's/.*"([^"]+)".*/\1/')" >> $GITHUB_ENV
           echo "TINYVPN_VERSION=$(curl -fsSL https://api.github.com/repos/wangyu-/tinyfecvpn/releases/latest | grep '"tag_name":' | head -n 1 | sed -E 's/.*"([^"]+)".*/\1/')" >> $GITHUB_ENV
           cat $GITHUB_ENV
-        shell: bash
+        shell: bash
+
+      - name: Run every 60 days
+        uses: appleboy/ssh-action@master
+        with:
+          host: ${{ secrets.VPS_SSH_HOSTNAME_HKG }}
+          username: ${{ secrets.VPS_SSH_USERNAME }}
+          key: ${{ secrets.VPS_SSH_KEY }}
+          port: ${{ secrets.VPS_SSH_PORT }}
+          script_stop: true
+          script: |
+            cd devops/docker/lego
+            bash docker_run.sh