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

38 lines
914 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: "./*"
target: "."
# - 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:
# pm2 restart account