Skip to content

Deploy by @Rycko1

Deploy by @Rycko1 #7

name: Build & Deploy
run-name: Deploy by @${{ github.actor }}
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.x"
- name: Build
shell: bash
run: |
dotnet workload install wasm-tools
dotnet publish -c Release
- name: Archive artifact
shell: bash
run: tar -C Rycko1.github.io/bin/Release/net8.0/publish/wwwroot -cvf "$RUNNER_TEMP/artifact.tar" .
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: blazor
path: ${{ runner.temp }}/artifact.tar
if-no-files-found: error
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
with:
artifact_name: blazor