diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 40f177b7..c7ae73e4 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -1,12 +1,12 @@ -name: deploy -run-name: ${{ gitea.actor }} is deploying +name: deploy-test +run-name: ${{ gitea.actor }} is deploying to test server on: push: branches: - dev jobs: - deploy: + deploy-test: runs-on: ubuntu-latest steps: @@ -21,13 +21,13 @@ jobs: run: dotnet nuget add source --name gitea --username publisher --password ${{ secrets.PUBLISHER_PASSWORD }} --store-password-in-clear-text http://test.digitaldrilling.ru:8080/api/packages/DDrilling/nuget/index.json - run: dotnet test AsbCloudWebApi.Tests - run: dotnet publish AsbCloudWebApi --os linux --sc true -o ./build - - name: Deploy to Server - uses: appleboy/ssh-action@v1.0.3 - with: - host: test.digitaldrilling.ru - username: asb - key: ${{ secrets.SSH_PRIVATE_KEY }} - port: 35222 - script: | - cd /home/asb/AsbCloudDeployTest/ - rsync -avzP --delete --exclude "backup" . ./backup \ No newline at end of file + - name: Deploy to Test server via rsync + uses: burnett01/rsync-deployments@5.2.1 + with: + switches: -avzr --delete --exclude="files" --exclude="appsettings.json" + path: ./build/ + remote_path: /home/asb/AsbCloud/ + remote_host: test.digitaldrilling.ru + remote_user: asb + remote_port: 35222 + remote_key: ${{ secrets.SSH_PRIVATE_KEY }} \ No newline at end of file