Changed parking code #126
This file contains 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: 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/[email protected] | |
with: | |
command: echo ${{ secrets.PRODPASS }} | sudo -S service ModernaMedia restart | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.HOST_NAME }} | |
password: ${{ secrets.HOST_PASSWORD }} |