From 9f69c8fd8bec9ca97a5c93d982961863162ede85 Mon Sep 17 00:00:00 2001 From: ced7 Date: Fri, 5 Apr 2024 17:01:22 +0200 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..6fd6563 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,26 @@ +name: Deploy to GitHub Pages + +#Run workflow on every push to the main branch +on: + push: + branches: [ main ] + +jobs: + deploy-to-github-pages: + # use ubuntu-latest image to run steps on + runs-on: ubuntu-latest + steps: + # uses GitHub's checkout action to checkout code from the main branch + - uses: actions/checkout@v4 + # sets up .net sdk + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' + # publishes Blazor project to the publish-folder + - name: Publish .NET Project + run: dotnet publish choixpeau.csproj -c Release + - name: Commit wwwroot to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: gh-pages + folder: publish/wwwroot