-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create main.yml for gh-pages deployment.
- Loading branch information
1 parent
204acfd
commit fe52d3f
Showing
1 changed file
with
33 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
deploy-to-github-pages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup .NET Core SDK | ||
uses: actions/setup-dotnet@v4.0.0 | ||
with: | ||
dotnet-version: 8.0 | ||
|
||
- name: Publish .NET Core Project | ||
run: dotnet publish src/Aneejian.Games.ClickMatch.Client/Aneejian.Games.ClickMatch.Client.csproj -c Release -o release --nologo | ||
|
||
- name: Change base-tag in index.html from / to ClickMatch | ||
run: sed -i 's/<base href="\/" \/>/<base href="\/ClickMatch\/" \/>/g' release/wwwroot/index.html | ||
|
||
- name: Add .nojekyll file | ||
run: touch release/wwwroot/.nojekyll | ||
|
||
- name: Commit wwwroot to GitHub Pages | ||
uses: JamesIves/github-pages-deploy-action@3.7.1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages | ||
FOLDER: release/wwwroot |