Update workflows #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: GitHub Pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'master' | |
jobs: | |
publish: | |
name: Publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET 7 | |
uses: actions/setup-dotnet@main | |
with: | |
dotnet-version: 7.x | |
- name: Setup .NET workload android | |
run: dotnet workload install android | |
- name: Setup .NET workload wasm-tools | |
run: dotnet workload install wasm-tools | |
- name: Restore | |
run: dotnet restore src/PDFtoImage.sln | |
- name: Publish | |
run: dotnet publisch src/WebConverter/WebConverter.csproj -c Release -p:PublishProfile=src/WebConverter/Properties/PublishProfiles/PublishSite.pubxml --no-restore | |
- name: Upload pages artifact | |
uses: actions/upload-pages-artifact@main | |
with: | |
path: src/WebConverter/bin/Publish | |
deploy: | |
name: Deploy | |
needs: publish | |
runs-on: ubuntu-latest | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@main |