Skip to content

Merge pull request #2 from rubberduck-vba/xmldoc #22

Merge pull request #2 from rubberduck-vba/xmldoc

Merge pull request #2 from rubberduck-vba/xmldoc #22

Workflow file for this run

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