-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
386215b
commit 7eb7f73
Showing
5 changed files
with
98 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,38 @@ | ||
name: Pure.DI check | ||
|
||
on: [push] | ||
on: [ push ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup dotnet | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: '8.0.x' | ||
|
||
- name: Build and check | ||
run: dotnet run --project ./build -- check | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup dotnet | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: '8.0.x' | ||
|
||
#- name: Build and check | ||
#run: dotnet run --project ./build -- check | ||
|
||
- name: Publish Blazor example | ||
run: dotnet run --project ./build -- publish | ||
|
||
- name: Change base-tag in index.html from / to BlazorGitHubPagesDemo | ||
run: sed -i 's/<base href="\/" \/>/<base href="\/BlazorWebAssemblyApp\/" \/>/g' wwwroot/index.html | ||
|
||
- name: copy index.html to 404.html | ||
run: cp wwwroot/index.html wwwroot/404.html | ||
|
||
- name: Add .nojekyll file | ||
run: touch wwwroot/.nojekyll | ||
|
||
- name: Commit wwwroot to GitHub Pages | ||
uses: JamesIves/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages | ||
FOLDER: wwwroot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ benchmarks/data/results/*.md | |
_ReSharper.Caches/ | ||
.idea | ||
.logs | ||
wwwroot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Publish Blazor example" type="DotNetProject" factoryName=".NET Project"> | ||
<option name="EXE_PATH" value="$PROJECT_DIR$/build/bin/roslyn4.3/Debug/net8.0/build.exe" /> | ||
<option name="PROGRAM_PARAMETERS" value="publish" /> | ||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> | ||
<option name="PASS_PARENT_ENVS" value="1" /> | ||
<option name="USE_EXTERNAL_CONSOLE" value="0" /> | ||
<option name="USE_MONO" value="0" /> | ||
<option name="RUNTIME_ARGUMENTS" value="" /> | ||
<option name="PROJECT_PATH" value="$PROJECT_DIR$/build/build.csproj" /> | ||
<option name="PROJECT_EXE_PATH_TRACKING" value="1" /> | ||
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" /> | ||
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="0" /> | ||
<option name="PROJECT_KIND" value="DotNetCore" /> | ||
<option name="PROJECT_TFM" value="net8.0" /> | ||
<method v="2"> | ||
<option name="Build" /> | ||
</method> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// ReSharper disable StringLiteralTypo | ||
// ReSharper disable HeapView.DelegateAllocation | ||
// ReSharper disable HeapView.ClosureAllocation | ||
// ReSharper disable ClassNeverInstantiated.Global | ||
// ReSharper disable ReturnTypeCanBeEnumerable.Local | ||
// ReSharper disable InvertIf | ||
|
||
namespace Build; | ||
|
||
internal class PublishBlazorTarget( | ||
Commands commands) | ||
: IInitializable, ITarget<int> | ||
{ | ||
public Task InitializeAsync() => commands.Register( | ||
this, | ||
"Publish balazor web sssembly example", | ||
"publish", | ||
"pb"); | ||
|
||
[SuppressMessage("Performance", "CA1861:Avoid constant arrays as arguments")] | ||
public async Task<int> RunAsync(CancellationToken cancellationToken) | ||
{ | ||
var result = await new DotNetPublish() | ||
.WithProject(Path.Combine("samples", "BlazorWebAssemblyApp", "BlazorWebAssemblyApp.csproj")) | ||
.WithConfiguration("Release") | ||
.WithOutput("wwwroot") | ||
.RunAsync(cancellationToken: cancellationToken); | ||
|
||
return result ?? 1; | ||
} | ||
} |