diff --git a/.gitea/workflows/deploy-to-test.yml b/.gitea/workflows/deploy-to-test.yml new file mode 100644 index 0000000..e00ab38 --- /dev/null +++ b/.gitea/workflows/deploy-to-test.yml @@ -0,0 +1,32 @@ +name: Deploy to Test Server + +on: + push: + branches: + - develop + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Deploy to test server + uses: appleboy/ssh-action@master + with: + host: 152.89.234.215 + port: 5050 + username: forexana + key: ${{ secrets.SSH_PRIVATE_KEY }} + script: | + # Izbrišemo obstoječo vsebino v mapi vtičnika + rm -rf test.forexanalysis.com/wp-content/plugins/custom_wheel\ 2/* + + # Kopiramo novo vsebino iz začasne mape kode + cp -r $GITHUB_WORKSPACE/* test.forexanalysis.com/wp-content/plugins/custom_wheel\ 2/ + + # Nastavimo pravilna dovoljenja + chmod -R 755 test.forexanalysis.com/wp-content/plugins/custom_wheel\ 2/ + + echo "Deployment completed successfully!" \ No newline at end of file