fix: add time to pm2 process reload #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Server CI | |
on: | |
push: | |
paths: | |
- ".github/workflows/server-ci.yml" | |
- "server/**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy | |
uses: garygrossgarten/github-action-ssh@release | |
with: | |
command: | | |
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
cd /var/www/torrent-streaming | |
git reset --hard | |
git pull | |
npm --prefix server install | |
npm --prefix server run build | |
pm2 reload server --time | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
privateKey: ${{ secrets.PRIVATE_KEY }} |