This repository was archived by the owner on Jan 10, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
54 lines (40 loc) · 1.46 KB
/
Copy pathdeploy-sample.yml
File metadata and controls
54 lines (40 loc) · 1.46 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
53
54
name: Deploy Sample
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
PROJECT_NAME: Supercode.Blazor.BreadcrumbNavigation
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.*
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore src/$PROJECT_NAME/$PROJECT_NAME.csproj
- name: Publish Sample Site
run: dotnet publish -c Release samples/BlazorWebAssembly/BlazorWebAssembly.csproj
- name: Rewrite base href
uses: SteveSandersonMS/ghaction-rewrite-base-href@v1
with:
html_path: samples/BlazorWebAssembly/bin/Release/net6.0/publish/wwwroot/index.html
base_href: /${{ github.event.repository.name }}/
- name: Add .nojekyll file
run: touch samples/BlazorWebAssembly/bin/Release/net6.0/publish/wwwroot/.nojekyll
- name: Deploy to Github Pages
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BASE_BRANCH: master # The branch the action should deploy from.
BRANCH: sample # The branch the action should deploy to.
FOLDER: samples/BlazorWebAssembly/bin/Release/net6.0/publish/wwwroot # The folder the action should deploy.
SINGLE_COMMIT: true