Skip to content

Instantly share code, notes, and snippets.

@xt0rted
Created March 2, 2020 17:47
Show Gist options
  • Save xt0rted/d6b9b6786be583af250bdf7e4108ec12 to your computer and use it in GitHub Desktop.
Save xt0rted/d6b9b6786be583af250bdf7e4108ec12 to your computer and use it in GitHub Desktop.
Building a .NET Core website with GitHub Actions
name: Build
on: pull_request
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 12
- name: Setup .net core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.102
- name: NPM install
run: npm ci
working-directory: src/Website
- name: NPM test
run: npm test
working-directory: src/Website
- name: NPM build
run: npm run build
working-directory: src/Website
- name: .NET build
run: dotnet build --configuration Release
- name: Publish site to artifacts
run: dotnet publish src\Website\Website.csproj --configuration Release --output ./artifacts/wwwroot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment