1

I'm using github actions to deploy my projects on my windows server using FTP

name: .NET

on: push: branches: [ main ] pull_request: branches: [ main ]

jobs: build:

runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
  uses: actions/setup-dotnet@v2
  with:
    dotnet-version: 6.0.x
- name: Init Utilities
  run: git submodule update --init
- name: Get Utilities
  run: git submodule update --remote -f
- name: Restore dependencies
  run: dotnet restore
- name: Build
  run: dotnet build --no-restore
- name: Publish
  run: dotnet publish
- name: Deploy
  uses: SamKirkland/[email protected]
  with:
    local-dir: LOCAL_DIR
    server: SERVER
    username: USERNAME
    password: PASSWORD
    dangerous-clean-slate: true

the problem is that I have to manually stop the server so the files could be uploaded.

but I don't want to stop the server manually. is there any way so I can force update the project without stoping the server or stop the server automatically?

1 Answer 1

1

You can add app_offline.htm to make your site offline. When publishing is complete, delete the app_offline.htm file.

Official doc: Taking Web Applications Offline with Web Deploy

You can refer the link to add app_offline.htm file when you delpoy the app.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.