Changes to self contained build
All checks were successful
cicd / build_test_publish_deploy_test (push) Successful in 1m58s
cicd / deploy_prod_manual (push) Has been skipped

This commit is contained in:
Janus C. H. Knudsen 2026-01-29 23:19:22 +01:00
parent 7cdc70709f
commit ee5b0783b9

View file

@ -13,13 +13,13 @@ jobs:
- uses: actions/setup-dotnet@v4 - uses: actions/setup-dotnet@v4
with: with:
dotnet-version: "9.0.x" dotnet-version: "10.0.x"
- name: Test - name: Test
run: dotnet test -c Release run: dotnet test -c Release
- name: Publish - name: Publish (self-contained linux-x64)
run: dotnet publish -c Release -o out run: dotnet publish -c Release -r linux-x64 --self-contained true -o out
- name: Install deploy tools - name: Install deploy tools
run: | run: |
@ -40,7 +40,7 @@ jobs:
ssh-keyscan -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts ssh-keyscan -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts
rsync -az --delete out/ "$DEPLOY_USER@$DEPLOY_HOST:/opt/minapp-test/app/" rsync -az --delete out/ "$DEPLOY_USER@$DEPLOY_HOST:/opt/minapp-test/app/"
ssh "$DEPLOY_USER@$DEPLOY_HOST" "sudo systemctl restart minapp-test" ssh "$DEPLOY_USER@$DEPLOY_HOST" "chmod +x /opt/minapp-test/app/MinApp && sudo systemctl restart minapp-test"
deploy_prod_manual: deploy_prod_manual:
if: ${{ github.event_name == 'workflow_dispatch' }} if: ${{ github.event_name == 'workflow_dispatch' }}
@ -50,10 +50,15 @@ jobs:
- uses: actions/setup-dotnet@v4 - uses: actions/setup-dotnet@v4
with: with:
dotnet-version: "8.0.x" dotnet-version: "10.0.x"
- name: Publish - name: Publish (self-contained linux-x64)
run: dotnet publish -c Release -o out run: dotnet publish -c Release -r linux-x64 --self-contained true -o out
- name: Install deploy tools
run: |
apt-get update
apt-get install -y rsync openssh-client
- name: Deploy PROD - name: Deploy PROD
env: env:
@ -69,4 +74,4 @@ jobs:
ssh-keyscan -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts ssh-keyscan -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts
rsync -az --delete out/ "$DEPLOY_USER@$DEPLOY_HOST:/opt/minapp/app/" rsync -az --delete out/ "$DEPLOY_USER@$DEPLOY_HOST:/opt/minapp/app/"
ssh "$DEPLOY_USER@$DEPLOY_HOST" "sudo systemctl restart minapp" ssh "$DEPLOY_USER@$DEPLOY_HOST" "chmod +x /opt/minapp/app/MinApp && sudo systemctl restart minapp"