-
-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (34 loc) · 1.08 KB
/
gh-pages.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
name: deploy-pages
on:
push:
branches: [master]
jobs:
deploy-gh-pages:
runs-on: ubuntu-latest
env:
DOTNET_NOLOGO: 1
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # all history
- name: Read .NET Core SDK version
id: globaljson
shell: pwsh
run: |
dotnet --version
if ($LASTEXITCODE -ne 0) { # if dotnet didn't find version required by globaljson, it exits with non-0 code
Write-Host "::set-output name=version::$((Get-Content global.json -Raw | ConvertFrom-Json).sdk.version)"
}
$LASTEXITCODE = 0
- uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ steps.globaljson.outputs.version }}
- run: dotnet --info
- run: dotnet tool restore
- run: dotnet nbgv get-version
- run: dotnet publish src/WarHub.GodMode.GithubPages -c Release -o bin/publish
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ github.token }}
publish_dir: ./bin/publish/wwwroot