Skip to content

log error for email sending #29

log error for email sending

log error for email sending #29

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: Build
on:
workflow_dispatch:
push:
jobs:
Build_Test_Deploy:
runs-on: windows-latest
environment: test
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: App Settings Variable Substitution
uses: microsoft/variable-substitution@v1
with:
files: '**/appsettings.json'
env:
MailerSettings.From: ${{ secrets.MAILER_SETTINGS_FROM }}
MailerSettings.Username: ${{ secrets.MAILER_SETTINGS_USERNAME }}
MailerSettings.Password: ${{ secrets.MAILER_SETTINGS_PASSOWRD }}
MailerSettings.Host: ${{ secrets.MAILER_SETTINGS_HOST }}
MailerSettings.Port: ${{ secrets.MAILER_SETTINGS_PORT }}
MailerSettings.EnableSSL: ${{ secrets.MAILER_SETTINGS_ENABLESSL }}
Token.Secret: ${{ secrets.TOKEN_SECRET }}
- name: Publish
run: dotnet publish HamEvent/HamEvent.csproj --configuration Release --framework net7.0 --output ./publish --runtime win-x64 --self-contained true -p:PublishTrimmed=false -p:PublishSingleFile=false
- name: Deploy
uses: rasmusbuchholdt/[email protected]
with:
website-name: ${{ secrets.WEBSITE_NAME }}
server-computer-name: ${{ secrets.SERVER_COMPUTER_NAME }}
server-username: ${{ secrets.SERVER_USERNAME }}
server-password: ${{ secrets.SERVER_PASSWORD }}
# skip-directory-path: '\\App_Data'