kios-webapp/.github/workflows/payload.yml

30 lines
714 B
YAML
Raw Normal View History

name: Payload update
2023-05-13 14:55:41 +00:00
on:
repository_dispatch:
types: [payload_update]
2023-05-13 14:55:41 +00:00
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"
2023-05-13 14:55:41 +00:00
build:
needs: cancel
2023-05-13 14:55:41 +00:00
runs-on: ubuntu-latest
steps:
- name: Trigger build
uses: appleboy/ssh-action@master
2023-05-13 14:55:41 +00:00
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.KEY }}
script: |
cd ${{ secrets.PATH }}
npm run prod astro