-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.41 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Deploy Github Pages
on:
push:
branches:
- "root"
jobs:
deploy:
name: Deploy Github Pages
runs-on: ubuntu-latest
permissions:
packages: read
contents: write
steps:
- name: Checkout Code
uses: actions/checkout@master
with:
submodules: "recursive"
fetch-depth: 0
- name: Setup Dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x' # SDK Version to use
- name: Testing
run: dotnet test Gameboy.Test
- name: Change base-tag
run: sed -i 's/<base href="\/" \/>/<base href="\/BlazorBoy\/" \/>/g' Gameboy.Player.Blazor/wwwroot/index.html
- name: Restore Packages
env:
GITHUB_USERNAME: qkmaxware
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: dotnet restore
- name: Build Site
env:
GITHUB_USERNAME: qkmaxware
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: dotnet publish Gameboy.Player.Blazor -c Release -o .site
- name: Add .nojekyll file
run: touch .site/wwwroot/.nojekyll
- name: Custom 404
run: cp .site/wwwroot/index.html .site/wwwroot/404.html
- name: Commit to Github Pages
uses: JamesIves/[email protected]
with:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: .site/wwwroot