-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (48 loc) · 1.49 KB
/
dotnet-core.yml
File metadata and controls
52 lines (48 loc) · 1.49 KB
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
51
52
name: .NET Core
on:
push:
branches: [ master ]
repository_dispatch:
types: content-changed
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.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 PetrSvihlik.Com.csproj --configuration Release --no-build -o ./tools
- name: "Artifact : generator"
uses: actions/upload-artifact@v7
with:
name: "Generator"
path: ./tools
- name: Publish
run: dotnet run --configuration Release
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@v7
with:
name: "Site"
path: ./output
- name: Deploy 🚀
if: github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@v4.8.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: output
clean: true # Automatically remove deleted files from the deploy branch