Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend Tweaks #2

Merged
merged 11 commits into from
Nov 10, 2024
Prev Previous commit
Next Next commit
moving dotnet-cd to self-hosted runner
retailcoder committed Nov 3, 2024
commit 035f8563c37bbc3cf460cb6eb703281e0c6f0077
33 changes: 8 additions & 25 deletions .github/workflows/dotnet-cd.yml
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ permissions:

jobs:
build:
runs-on: windows-latest
runs-on: self-hosted

steps:
- uses: actions/checkout@v4
@@ -29,31 +29,14 @@ jobs:
- name: dotnet publish
run: dotnet publish "rubberduckvba.Server\rubberduckvba.Server.csproj" --configuration Release --output ${{env.DOTNET_ROOT}}\pub

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: webapi
path: ${{env.DOTNET_ROOT}}/pub

deploy:
environment:
name: AZ-Test
url: https://test.rubberduckvba.com
permissions:
contents: none
runs-on: windows-latest
runs-on: self-hosted
needs: build
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: webapi
- name: Deploy to IIS
id: deploy-to-iis
uses: ChristopheLav/iis-deploy@v1
with:
website-name: 'api'
msdeploy-service-url: ${{ secrets.MSDEPLOY_URL }}
msdeploy-username: ${{ secrets.MSDEPLOY_USERNAME }}
msdeploy-password: ${{ secrets.MSDEPLOY_PASSWORD }}
source-path: ${{ github.workspace }}\website\publish
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