Skip to content

Continuous Deployment #40

Continuous Deployment

Continuous Deployment #40

Workflow file for this run

name: Continuous Delivery
on:
workflow_dispatch:
workflow_run:
workflows: [Continuous Integration]
types: [completed]
branches: [main]
jobs:
deploy:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Publish
run: dotnet publish ./src/Numerous.Web/Numerous.Web.csproj -c Release --os linux -o ./dist
- name: Deploy
run: >
systemctl stop $SERVICE_NAME &&
cd ./dist/ &&
echo */ | sed -r -e "s|^|$DEPLOYMENT_PATH/|" -e "s|/ |/ $DEPLOYMENT_PATH/|g" | xargs rm -rf &&
mv -f ./* $DEPLOYMENT_PATH &&
systemctl start $SERVICE_NAME