-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (46 loc) · 1.43 KB
/
dotnet-core.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: .NET Core
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-build --verbosity normal
- name: Publish
run: dotnet publish --configuration Release --no-build -o ./tools
- name: "Artifact : generator"
uses: actions/upload-artifact@v2
with:
name: "Generator"
path: ./tools
- name: Publish
run: dotnet run --configuration Release -- -l Debug
env:
LinkRoot: ${{ secrets.LINKROOT }} # Fix subfolder links https://statiq.dev/framework/configuration/settings
Host: ${{ secrets.HOST }} # Make links absolute (for feeds, OG...)
- name: "Artifact : site"
uses: actions/upload-artifact@v2
with:
name: "Site"
path: ./output
- name: Deploy 🚀
if: github.ref == 'refs/heads/main'
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: output
CLEAN: true # Automatically remove deleted files from the deploy branch