Skip to content

Commit

Permalink
Update pipelines (maybe?)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkatz6 committed Mar 17, 2024
1 parent 16a24b9 commit 7c03039
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 22 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/azure-swa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,17 @@ jobs:
with:
submodules: recursive

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1.9.0
- name: Setup .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.100

- name: Install wasm-tools
run: dotnet workload install wasm-tools wasm-experimental

- name: Install DotNetCompress
run: dotnet tool install --global DotNetCompress --version 1.0.0-preview.7 --no-cache
run: dotnet workload install wasm-tools

- name: Publish .NET Project
run: dotnet publish Wordle.Browser/Wordle.Browser.csproj -c Release -o release --nologo
run: dotnet publish Wordle.Browser/Wordle.Browser.csproj -p:RunAOTCompilation=true -c Release --nologo

- name: Brotli Compress Output (dll)
run: DotNetCompress -d Wordle.Browser/bin/Release/net7.0/browser-wasm/AppBundle/ -p '*.dll' -p '*.js' -p '*.symbols' -p '*.blat' -p '*.bin' -p '*.wasm'

- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
Expand All @@ -38,7 +34,7 @@ jobs:
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "Wordle.Browser/bin/Release/net7.0/browser-wasm/AppBundle/" # App source code path
app_location: "Wordle.Browser/bin/Release/net8.0-browser/publish/wwwroot/" # App source code path
api_location: "" # Api source code path - optional
output_location: "" # Modify this to where your SSG places the built HTML - could be `dist`, `build`... check your config
skip_app_build: true
Expand Down
18 changes: 7 additions & 11 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,23 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1.9.0
- name: Setup .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.100

- name: Install wasm-tools
run: sudo dotnet workload install wasm-tools

- name: Publish .NET Project
run: sudo dotnet publish Wordle.Web/Wordle.Web.csproj -c Release -o release --nologo

- name: Change base-tag in index.html from / to Wordle
run: sudo sed -i 's/<base href="\/" \/>/<base href="\/Wordle-onia\/" \/>/g' release/wwwroot/index.html

- name: copy index.html to 404.html
run: sudo cp release/wwwroot/index.html release/wwwroot/404.html
run: dotnet publish Wordle.Browser/Wordle.Browser.csproj -p:RunAOTCompilation=true -c Release --nologo

- name: Add .nojekyll file
run: sudo touch release/wwwroot/.nojekyll
run: sudo touch Wordle.Browser/bin/Release/net8.0-browser/publish/wwwroot/.nojekyll

- name: Commit wwwroot to GitHub Pages
uses: JamesIves/github-pages-deploy-action@4.1.7
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: release/wwwroot
FOLDER: Wordle.Browser/bin/Release/net8.0-browser/publish/wwwroot/
2 changes: 2 additions & 0 deletions Wordle.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{366944AC-9055-49D2-9F43-D68BC6FB9125}"
ProjectSection(SolutionItems) = preProject
Directory.Build.props = Directory.Build.props
.github\workflows\azure-swa.yml = .github\workflows\azure-swa.yml
.github\workflows\dotnet.yml = .github\workflows\dotnet.yml
EndProjectSection
EndProject
Global
Expand Down

0 comments on commit 7c03039

Please sign in to comment.