Skip to content

Instantly share code, notes, and snippets.

@zHaytam
Last active June 8, 2020 18:44
Show Gist options
  • Save zHaytam/6ea7a9b45f1dec89584b664a2f382061 to your computer and use it in GitHub Desktop.
Save zHaytam/6ea7a9b45f1dec89584b664a2f382061 to your computer and use it in GitHub Desktop.
Blazor Wasm GitHu bctions workflow
name: DeployToGitHubPages
env:
PUBLISH_DIR: bin/Release/netstandard2.1/publish/wwwroot
# Include subfolders if needed
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Publish app
run: dotnet publish -c Release
# You can use cd before if your project is in a subfolder
- name: Rewrite base href
uses: SteveSandersonMS/ghaction-rewrite-base-href@v1
with:
html_path: ${{ env.PUBLISH_DIR }}/index.html
base_href: /YourRepositoryName/
- name: GitHub Pages
if: success()
uses: crazy-max/[email protected]
with:
target_branch: gh-pages
build_dir: ${{ env.PUBLISH_DIR }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment