Last active
February 21, 2025 16:07
-
-
Save sebastiandammark/e2ea5a0070397167d76fd3eecd964b14 to your computer and use it in GitHub Desktop.
Simply Github Deploy Action
This file contains hidden or 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
| 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