This repository was archived by the owner on Aug 17, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 5
34 lines (33 loc) · 1.12 KB
/
main.yml
File metadata and controls
34 lines (33 loc) · 1.12 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
name: Build
on:
push:
branches:
- master
jobs:
build:
runs-on: [windows-latest]
steps:
- uses: actions/checkout@v1
- name: Setup Public Dir
run: |
New-Item -Path .\_public -Type Directory
New-Item -Name .\_public\.nojekyll -ItemType File
- name: Build Documentation
run: |
choco install docfx -y
docfx .\Docs\docfx.json
Move-Item -Path .\Docs\doc\* -Destination .\_public
- name: Build Demo
run: |
(Get-Content -Path .\Demos\DemoBlazorApp\wwwroot\index.html) -replace '<base href="/" />', '<base href="/VisualProgrammer/wasm-demo/" />' | Set-Content -Path .\Demos\DemoBlazorApp\wwwroot\index.html
dotnet restore
dotnet publish --configuration Release --output demo-build
Rename-Item .\demo-build\DemoBlazorApp\dist wasm-demo
Move-Item -Path .\demo-build\DemoBlazorApp\wasm-demo -Destination .\_public
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v1
with:
target_branch: gh-pages
build_dir: _public
env:
GITHUB_PAT: ${{ secrets.GITHUB_PAT }}