2

I found this question. Right now, my deployment works as follows:

  1. Hit the web depoly button in VS. In the old ASP.NET world, this was all that had to be done.
  2. Open the developer command prompt.
  3. Run npm run build
  4. Open the project folder and find the index.html file and the dist folder.
  5. Open another Explorer and navigate to the IIS's shared folder.
  6. Copy the files onto the server.

My question is, if there is a simple way to integrate steps 2 to 6 into the UI web deploy command of Visual Studio. I guess, that I am not the only person on the planet who is looking for such a one-click solution, but unfortunately I can't find anything. But I'm pretty sure, that I'm just searching for the wrong keywords.

André Reichelt
  • 1,484
  • 18
  • 52
  • your Vue project is one project of ASP.net solution? or Vue project will be deployed into one sub folder `web deploy` points? – Sphinx Sep 14 '20 at 16:23
  • @Sphinx Our solution contains the Vue project only. There is only this single project involved. – André Reichelt Sep 15 '20 at 07:41
  • 1
    one solution is uses `powershell(win)/bash(linux)` to execute `step2` to `step6`. then add this shell script into external tool into visualstudio. – Sphinx Sep 15 '20 at 21:24

1 Answers1

2

The most simple solution would be to write a simple script that does steps 3-6, and then find a way to make VS Code run it. However, if you are making regular changes, you should probably commit your code to a repository like git and use CI/CD to make the deployment a part of your code commit. Even if you aren't branching your project - the purpose is to automate your build and deploy workflow. With Continuous Integration (CI), as soon as you commit your code, it will then be automatically deployed. In the long run, following this kind of workflow will save you time.

Some projects that you could use for this kind of workflow:

paul
  • 81
  • 2