Merge pull request #2 from rubberduck-vba/xmldoc #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: dotnet-CD | |
on: | |
push: | |
branches: [ "main" ] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up dependency caching for faster builds | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Build with dotnet | |
run: dotnet build rubberduckvba.Server --configuration Release | |
- name: dotnet publish | |
run: dotnet publish "rubberduckvba.Server\rubberduckvba.Server.csproj" --configuration Release --output ${{env.DOTNET_ROOT}}\pub | |
deploy: | |
runs-on: self-hosted | |
needs: build | |
steps: | |
- name: Deploy to IIS | |
run: | | |
stop-webapppool rubberduckvba | |
stop-iissite -Name api -Confirm: $false | |
Copy-Item ${{env.DOTNET_ROOT}}\pub\* C:/inetpub/wwwroot -Recurse -Force | |
start-webapppool rubberduckvba | |
start-iissite api |