瀏覽代碼

Merge pull request #1 from ja-rg/master

Deploy Pruebas
Alejandro Rosales 1 年之前
父節點
當前提交
29ebce074f
共有 1 個文件被更改,包括 26 次插入0 次删除
  1. 26 0
      .github/workflows/main.yml

+ 26 - 0
.github/workflows/main.yml

@@ -0,0 +1,26 @@
+name: Deploy Pruebas
+
+on:
+  push:
+    branches:
+      - Pruebas
+
+jobs:
+  deploy:
+    runs-on: ubuntu-latest
+    environment: 
+      name: pruebasPAAD
+    steps:
+    - name: Checkout code
+      uses: actions/checkout@v2
+
+    - name: Deploy to Server
+      uses: appleboy/ssh-action@master
+      with:
+        host: ${{ secrets.SERVER_IP }}
+        username: ${{ secrets.SERVER_USER }}
+        key: ${{ secrets.SSH_PRIVATE_KEY }}
+        script: |
+          cd /usr/share/nginx/html/paad/
+          git fetch --all
+          git reset --hard origin/main