Skip to content

deploy

deploy #192

Workflow file for this run

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}