From 68c68c1097e3deb3a1a2515ce448c66cb895335a Mon Sep 17 00:00:00 2001 From: "Jose A. Fernandez" Date: Tue, 13 Feb 2024 12:10:00 -0300 Subject: [PATCH] Create action deploy-to-github-pages.yml --- .github/workflows/deploy-to-github-pages.yml | 35 ++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/deploy-to-github-pages.yml diff --git a/.github/workflows/deploy-to-github-pages.yml b/.github/workflows/deploy-to-github-pages.yml new file mode 100644 index 0000000..b7a0d49 --- /dev/null +++ b/.github/workflows/deploy-to-github-pages.yml @@ -0,0 +1,35 @@ +# This workflow will build a .NET project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net + +name: . + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Restore dependencies + working-directory: src + run: dotnet restore + - name: Publish + working-directory: src + run: dotnet publish BlazorEmojiSearch/BlazorEmojiSearch.csproj -c Release -o release --nologo --no-restore + - name: Deploy to Github Pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: release/wwwroot + SINGLE_COMMIT: true