rtl-epub-maker/.github/workflows/deploy.yml

39 lines
996 B
YAML
Raw Normal View History

2023-11-27 10:35:48 +00:00
name: Deploy
2022-02-09 22:23:08 +00:00
on:
push:
2023-11-27 10:35:48 +00:00
branches:
- master
workflow_dispatch:
2022-02-09 22:23:08 +00:00
jobs:
2023-11-27 10:35:48 +00:00
new-deploy-account:
name: Deploy
2022-02-09 22:23:08 +00:00
runs-on: ubuntu-latest
steps:
2023-11-27 10:35:48 +00:00
- uses: actions/checkout@v3
- run: |
npm install
npm run build
npm prune --production
rm -rf .git
- name: copy tarball to server
uses: appleboy/scp-action@v0.1.4
2022-02-09 22:23:08 +00:00
with:
2023-11-27 10:35:48 +00:00
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.KEY }}
source: "./*"
2023-11-27 10:43:46 +00:00
target: "rtl-epub-maker"
- name: unpack tarball and restart app
uses: appleboy/ssh-action@v1.0.0
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
rm -rf apps/live/rtl-epub-maker
mv rtl-epub-maker apps/live
pm2 restart account