Update dotnet.yml #7
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: .NET | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
working-directory: . | |
- name: Build | |
run: dotnet build --no-restore | |
working-directory: . | |
- name: Test | |
run: dotnet Test --no-build --verbosity normal | |
#working-directory: . | |
- name: Publish with dotnet | |
run: dotnet publish --configuration Release --output build | |
#working-directory: . | |
- name: Deploy to Github Pages | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
ACCESS_TOKEN: ${{ secrets.GH_PAT }} | |
BASE_BRANCH: main # The branch the action should deploy from. | |
BRANCH: master # The branch the action should deploy to. | |
FOLDER: ./build/wwwroot # The folder the action should deploy. | |
SINGLE_COMMIT: true |