website/Infrastructure/.drone.yml

47 lines
No EOL
999 B
YAML

kind: pipeline
name: default
clone:
skip_verify: true
volumes:
- name: output
host:
path: /var/www/Website
pipeline:
notify:
image: drillster/drone-email
host: 192.168.1.3
from: build@robware.uk
when:
status: [ changed, failure ]
steps:
- name: build and publish
image: mcr.microsoft.com/dotnet/core/sdk:2.2
volumes:
- name: output
path: /output
environment:
ConnectionString:
from_secret: ConnectionString
commands:
- curl -sL https://deb.nodesource.com/setup_12.x | bash -
- apt-get install -y nodejs
- chmod +x ./build.sh
- ./build.sh
- sed -i "s/<DatabaseConnectionString>/$ConnectionString/g" output/appsettings.json
- cp Infrastructure/website.service output/
- cp -r ./output/* /output
- name: restart service
image: appleboy/drone-ssh
settings:
host:
from_secret: SSHHost
username:
from_secret: SSHUsername
password:
from_secret: SSHPassword
script:
- service website restart