51820b5794
Signed-off-by: Max Schmidt <max.schmidt@outlook.de>
25 lines
682 B
YAML
25 lines
682 B
YAML
name: Trigger Astro build on server
|
|
on:
|
|
repository_dispatch:
|
|
types: [payload_update]
|
|
jobs:
|
|
build:
|
|
name: Run remote SSH command
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Trigger build via ssh
|
|
uses: appleboy/ssh-action@master
|
|
with:
|
|
host: ${{ secrets.HOST }}
|
|
username: ${{ secrets.USER }}
|
|
key: ${{ secrets.KEY }}
|
|
script: |
|
|
if [ -d ${{ secrets.PATH }} ]; then
|
|
cd ${{ secrets.PATH }}
|
|
git pull
|
|
else
|
|
mkdir ${{ secrets.PATH }}
|
|
cd ${{ secrets.PATH }}
|
|
git clone -b prod https://github.com/mooxl/astroad .
|
|
fi
|