-
Notifications
You must be signed in to change notification settings - Fork 10
28 lines (24 loc) · 1.01 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: deploy
on: [ workflow_dispatch ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- uses: actions/checkout@v2
- name: Publish the core
run: dotnet publish TPP.Core -c Release -r linux-x64 -p:PublishSingleFile=true --no-self-contained -p:IncludeNativeLibrariesForSelfExtract=true
- name: Deploy the core to TPP
env:
SSHUSER: ${{ secrets.TPP_SSH_USER }}
SSHPRIVKEY: ${{ secrets.TPP_SSH_PRIVATE_KEY }}
SSHHOST: ${{ secrets.TPP_SSH_HOST }}
SSHPORT: ${{ secrets.TPP_SSH_PORT }}
run: |
echo "$SSHPRIVKEY" > tpp.key
chmod 600 tpp.key
scp -q -i tpp.key -o StrictHostKeyChecking=no -P ${SSHPORT} artifacts/publish/TPP.Core/release_linux-x64/TPP.Core ${SSHUSER}@${SSHHOST}:core_update
cat .github/workflows/deploy.sh | ssh -q -i tpp.key -o StrictHostKeyChecking=no -p ${SSHPORT} ${SSHUSER}@${SSHHOST}