Skip to content

Instantly share code, notes, and snippets.

@sebastiandammark
Last active February 21, 2025 16:07
Show Gist options
  • Select an option

  • Save sebastiandammark/e2ea5a0070397167d76fd3eecd964b14 to your computer and use it in GitHub Desktop.

Select an option

Save sebastiandammark/e2ea5a0070397167d76fd3eecd964b14 to your computer and use it in GitHub Desktop.
Simply Github Deploy Action
name: Build and deploy project to Simply
on:
workflow_dispatch:
push:
branches: [ "main" ] # Remove this line if you only want to trigger the deploy manually
env:
SolutionName: '{ProjectName}' # Replace this with the name of your cs.proj file
BuildPlatform: 'win-x86'
BuildConfiguration: Release
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: dotnet restore ./${{env.SolutionName}}.csproj
- name: Build
run: dotnet build ./${{env.SolutionName}}.csproj --configuration ${{env.BuildConfiguration}} --no-restore
- name: Publish
run: dotnet publish ./${{env.SolutionName}}.csproj --configuration ${{env.BuildConfiguration}} --output ./publish --runtime ${{env.BuildPlatform}} --self-contained true -p:PublishTrimmed=false -p:PublishSingleFile=true
- name: Deploy to Simply
uses: rasmusbuchholdt/simply-web-deploy@2.1.0
with:
website-name: ${{ secrets.WEBSITE_NAME }}
server-computer-name: https://${{secrets.SERVER_COMPUTER_NAME}}:8172/MsDeploy.axd
server-username: ${{ secrets.SERVER_USERNAME }}
server-password: ${{ secrets.SERVER_PASSWORD }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment