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

38 lines
914 B
YAML

name: Deploy
on:
push:
branches:
- master
workflow_dispatch:
jobs:
new-deploy-account:
name: Deploy
runs-on: ubuntu-latest
steps:
- 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
with:
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