-
Notifications
You must be signed in to change notification settings - Fork 6
47 lines (41 loc) · 1.29 KB
/
ci.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
name: Continuous Integration Workflow
on: [push, pull_request]
jobs:
build:
name: Build and Test
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- run: dotnet restore
- run: dotnet build --no-restore --configuration Release
- run: dotnet test --no-build --configuration Release
- run: dotnet publish --no-build --configuration Release --output staging/Blazor ./src/NPacMan.Blazor/
- name: Upload blazor site
uses: actions/upload-artifact@v1
with:
name: blazor
path: staging/Blazor
deploy_blazor:
name: Deploy Blazor
needs: build
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
steps:
- uses: actions/checkout@v2
with:
ref: 'refs/heads/gh-pages'
path: 'blazor/wwwroot'
- name: Download blazor site
uses: actions/download-artifact@v1
with:
name: blazor
path: ./blazor
- run: |
cd blazor
cd wwwroot
sed -i 's/<base href="\/" \/>/<base href="\/PacMan\/" \/>/g' index.html
git config user.name "[email protected]"
git config user.email "[email protected]"
git add .
git commit -m "Updating site"
git push