-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (41 loc) · 1.46 KB
/
deploy.yml
File metadata and controls
51 lines (41 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
name: Deploy to GitHub Pages
permissions:
contents: write
pages: write
env:
PROJECT_PATH: src/client/presentation/EasyFocus.Browser/EasyFocus.Browser.csproj
OUTPUT_PATH: src/client/presentation/EasyFocus.Browser/bin/Release/net10.0-browser/publish/wwwroot
on:
workflow_dispatch:
jobs:
deploy-to-github-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup .NET 10
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Install wasm-tools
run: dotnet workload install wasm-tools
- name: Publish .NET Project
run: dotnet publish $PROJECT_PATH -c Release --nologo
- name: Change base-tag in index.html
run: sed -i 's#<base href="/" />#<base href="/EasyFocus/" />#g' $OUTPUT_PATH/index.html
- name: copy index.html to 404.html
run: cp $OUTPUT_PATH/index.html $OUTPUT_PATH/404.html
- name: Copy info page to output
run: |
cp docs/easyfocus-screenshot.png $OUTPUT_PATH/
cp docs/info.html $OUTPUT_PATH/
cp docs/styles.css $OUTPUT_PATH/
- name: Add .nojekyll file
run: touch $OUTPUT_PATH/.nojekyll
- name: Commit wwwroot to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: ${{ env.OUTPUT_PATH }}
single-commit: true