Merge pull request #39 from Lorg0n/feature/NumberOfTracked #168
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: Deployment Workflow | |
# Trigger this workflow on pushes to the specified branch | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: yarn install | |
- name: Build Next.js app | |
run: yarn build | |
- name: SSH Deploy | |
# Use the 'appleboy/ssh-action' action for SSH deployment | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} # server's IP address | |
username: ${{ secrets.USERNAME }} # server's username | |
key: ${{ secrets.SSH_PRIVATE_KEY }} # server's SSH private key | |
passphrase: ${{ secrets.SSH_PASSWORD }} # server's SSH key password | |
script: | | |
export NVM_DIR=~/.nvm | |
source ~/.nvm/nvm.sh | |
cd /home/debian/hikka-next | |
git pull | |
yarn install | |
yarn build | |
pm2 reload hikka-next |