ce5bf1edf0
Signed-off-by: Max Schmidt <max.schmidt@outlook.de>
30 lines
714 B
YAML
30 lines
714 B
YAML
name: Payload update
|
|
on:
|
|
repository_dispatch:
|
|
types: [payload_update]
|
|
jobs:
|
|
cancel:
|
|
name: Cancel Previous Runs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Cancel Previous Runs
|
|
uses: styfle/cancel-workflow-action@0.11.0
|
|
with:
|
|
ignore_sha: true
|
|
access_token: ${{ github.token }}
|
|
workflow_id: "payload.yml"
|
|
|
|
build:
|
|
needs: cancel
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Trigger build
|
|
uses: appleboy/ssh-action@master
|
|
with:
|
|
host: ${{ secrets.HOST }}
|
|
username: ${{ secrets.USER }}
|
|
key: ${{ secrets.KEY }}
|
|
script: |
|
|
cd ${{ secrets.PATH }}
|
|
npm run prod astro
|