Skip to content

added: workflow for github actions #1

added: workflow for github actions

added: workflow for github actions #1

Workflow file for this run

on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy to VPS
uses: appleboy/ssh-action@v0.1.10
with:
host: ${{ secrets.VPS_SSH_HOST }}
username: ${{ secrets.VPS_SSH_USERNAME }}
key: ${{ secrets.VPS_SSH_SECRET }}
passphrase: ${{ secrets.VPS_SSH_PASSPHRASE }}
port: ${{ secrets.VPS_SSH_PORT }}
script: |
eval "$(ssh-agent)"
ssh-add ~/.ssh/id_rsa
cd ${{ secrets.PROJECT_PATH }}
git pull origin main
docker-compose rm -sf
docker-compose build
docker-compose up -d
docker image prune -af