Skip to content

Update workflows

Update workflows #8

Workflow file for this run

# 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: Deploy to 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 build src/WebConverter/WebConverter.csproj -p:DeployOnBuild=true -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