Skip to content

thank

thank #105

Workflow file for this run

name: Deploy
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
types:
- closed
env:
GIT_SSH_COMMAND: ssh -i /home/ubuntu/binsar/.ssh/id_rsa_personal_asistant -o IdentitiesOnly=yes
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Pull commit
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.SSHKEY }}
envs: GIT_SSH_COMMAND
script: |
cd ${{ secrets.SERVER_CWD }}
yarn install --production
yarn build
GEMINI_KEY="${{ secrets.GEMINI_KEY }}" pm2 restart ecosystem.config.js --update-env
history -d $(history 2 | awk '{print $1}')
pm2 save