DD.WellWorkover.Cloud/.gitea/workflows/deploy.yaml
2024-01-16 11:47:11 +05:00

33 lines
1.1 KiB
YAML

name: deploy
run-name: ${{ gitea.actor }} is deploying
on:
push:
branches:
- dev
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Setup dotnet
if: ${{ steps.cache-dotnet.outputs.cache-hit != 'true' }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Check out repository code
uses: actions/checkout@v4
- name: Add gitea as nuget source
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