Skip to content

Instantly share code, notes, and snippets.

@Piotr1215
Last active November 9, 2020 18:07
Show Gist options
  • Save Piotr1215/e9ca0731eeeadafcbb4b7373ff29a0a0 to your computer and use it in GitHub Desktop.
Save Piotr1215/e9ca0731eeeadafcbb4b7373ff29a0a0 to your computer and use it in GitHub Desktop.
name: Deploy to Netlify
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
name: Deploying to Netlify
steps:
- uses: actions/checkout@master
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.300
- name: Build with dotnet
run: dotnet build --configuration Release
- name: Publish Blazor webassembly using dotnet
run: dotnet publish -c Release --no-build -o publishoutput
- name: Publish generated Blazor webassembly to Netlify
uses: netlify/actions/cli@master
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
with:
args: deploy --dir=publishoutput/wwwroot --prod
secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment