2023-05-17 14:27:48 +00:00
|
|
|
name: Payload update
|
2023-05-13 14:55:41 +00:00
|
|
|
on:
|
2023-05-13 15:54:57 +00:00
|
|
|
repository_dispatch:
|
2023-05-13 15:56:44 +00:00
|
|
|
types: [payload_update]
|
2023-05-13 14:55:41 +00:00
|
|
|
jobs:
|
2023-06-26 22:06:19 +00:00
|
|
|
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:
|
2023-06-26 22:06:19 +00:00
|
|
|
needs: cancel
|
2023-05-13 14:55:41 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-05-17 14:27:48 +00:00
|
|
|
- name: Trigger build
|
2023-05-13 15:33:41 +00:00
|
|
|
uses: appleboy/ssh-action@master
|
2023-05-13 14:55:41 +00:00
|
|
|
with:
|
2023-05-13 15:40:15 +00:00
|
|
|
host: ${{ secrets.HOST }}
|
|
|
|
username: ${{ secrets.USER }}
|
|
|
|
key: ${{ secrets.KEY }}
|
2023-05-13 15:33:41 +00:00
|
|
|
script: |
|
2023-05-17 14:27:48 +00:00
|
|
|
cd ${{ secrets.PATH }}
|
2023-07-28 14:23:49 +00:00
|
|
|
npm run prod astro
|