forked from ddrilling/AsbCloudServer
31 lines
881 B
YAML
31 lines
881 B
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
|
|
- 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 |