Skip to content

Merge branch 'main' of https://github.com/StanlyLife/ModernaMedia #127

Merge branch 'main' of https://github.com/StanlyLife/ModernaMedia

Merge branch 'main' of https://github.com/StanlyLife/ModernaMedia #127

Workflow file for this run

name: DotNet-Deploy
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: App Settings Variable Substitution
uses: microsoft/variable-substitution@v1
with:
files: '${{ github.workspace }}/ModernaMediaDotNet/ModernaMedia/appsettings.json'
env:
ConnectionStrings.DefaultConnection: ${{ secrets.DEFAULTCONNECTION }}
TwillioSettings.phonenumber: ${{ secrets.TWILLIOPHONENUMBER }}
TwillioSettings.accountSid: ${{ secrets.TWILLIOACCOUNTSID }}
TwillioSettings.authToken: ${{ secrets.TWILLIOAUTHTOKEN }}
TwillioSettings.MessagingServiceSid: ${{ secrets.TWILLIOMESSAGINJGSERVICESID }}
- name: Dotnet publish
run: dotnet publish ModernaMediaDotNet/ModernaMediaDotNet.sln -c Release -o build
- name: Deploy to dev-server
uses: garygrossgarten/github-action-scp@release
with:
local: /home/runner/work/ModernaMedia/ModernaMedia/build
remote: /var/www/ModernaMedia/DotNet
command: ls
#remote: ${{ secrets.REMOTE_TARGET }}
host: ${{ secrets.HOST }}
username: ${{ secrets.HOST_NAME }}
password: ${{ secrets.HOST_PASSWORD }}
- name: Restart web-dev service
uses: garygrossgarten/github-action-ssh@v0.5.0
with:
command: echo ${{ secrets.PRODPASS }} | sudo -S service ModernaMedia restart
host: ${{ secrets.HOST }}
username: ${{ secrets.HOST_NAME }}
password: ${{ secrets.HOST_PASSWORD }}