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 echo "Directory exists" else mkdir ${{ secrets.PATH }} cd ${{ secrets.PATH }} git clone https://github.com/mooxl/astroad fi