Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
yushulx committed Nov 14, 2023
2 parents bc845cf + c3fdd4b commit 7939cbf
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: blazorwasm

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ main ]
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: '7.0.x'
include-prerelease: true

- name: Publish .NET Core Project
run: dotnet publish example.csproj -c Release -o release --nologo
working-directory: ./example

- name: Change base-tag in index.html from / to Razor-Barcode-Library
run: sed -i 's/<base href="\/" \/>/<base href="\/Razor-Barcode-Library\/" \/>/g' release/wwwroot/index.html
working-directory: ./example

- name: copy index.html to 404.html
run: cp release/wwwroot/index.html release/wwwroot/404.html
working-directory: ./example

- name: Add .nojekyll file
run: touch release/wwwroot/.nojekyll
working-directory: ./example

- name: Commit wwwroot to GitHub Pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: example/release/wwwroot

0 comments on commit 7939cbf

Please sign in to comment.