30 lines
974 B
YAML
30 lines
974 B
YAML
|
name: Deploy to GitHub Pages
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches: [ main ]
|
||
|
workflow_dispatch:
|
||
|
|
||
|
jobs:
|
||
|
deploy-to-github-pages:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v3
|
||
|
- uses: actions/setup-dotnet@v2
|
||
|
with:
|
||
|
dotnet-version: '6.0.x'
|
||
|
- name: Publish .NET Core Project
|
||
|
run: dotnet publish -c Release -o release --nologo
|
||
|
- name: Change base-tag in index.html from / to BlazorGitHubPagesDemo
|
||
|
run: sed -i 's/<base href="\/" \/>/<base href="\/nft-faucet\/" \/>/g' release/wwwroot/index.html
|
||
|
- name: copy index.html to 404.html
|
||
|
run: cp release/wwwroot/index.html release/wwwroot/404.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
|