-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (37 loc) · 1.28 KB
/
dotnet.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
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: AraratMorse GitHub Pages
permissions:
contents: write
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Add AOT Workload
run: |
dotnet workload install wasm-tools-net7
dotnet workload restore
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
# publishes Blazor project to the release-folder
- name: Publish Blazor
run: dotnet publish ./AraratMorse/AraratMorse.csproj -c Release -o release --nologo
- name: Change base-tag in index.html from / to ArartMorse
run: sed -i 's/<base href="\/" \/>/<base href="\/AraratMorse\/" \/>/g' release/wwwroot/index.html
- name: Add .nojekyll file
run: touch release/wwwroot/.nojekyll
- name: Commit wwwroot to GitHub Pages
uses: JamesIves/[email protected]
with:
BRANCH: gh-pages
FOLDER: release/wwwroot