Skip to content

Deploy

Deploy #38

Workflow file for this run

name: Deploy
on:
workflow_run:
workflows: [Rust]
types:
- completed
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v1
- name: Copy repository contents via scp
uses: appleboy/scp-action@master
env:
HOST: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
PORT: ${{ secrets.PORT }}
KEY: ${{ secrets.SSHKEY }}
with:
source: "."
target: "/var/www/brunnylol"
- name: Executing remote command
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
PORT: ${{ secrets.PORT }}
KEY: ${{ secrets.SSHKEY }}
command_timeout: 30m
script_stop: true
script: |
cd /var/www/brunnylol
/root/.cargo/bin/cargo build --release
systemctl restart brunnylol.xyz.service