Skip to content

deploy

deploy #116

Workflow file for this run

name: deploy
on: [ workflow_dispatch ]
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: TPP.Core
steps:
- name: Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- uses: actions/checkout@v2
- name: Publish the core
run: dotnet publish -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} bin/Release/net6.0/linux-x64/publish/TPP.Core ${SSHUSER}@${SSHHOST}:core_update
cat ../.github/workflows/deploy.sh | ssh -q -i tpp.key -o StrictHostKeyChecking=no -p ${SSHPORT} ${SSHUSER}@${SSHHOST}