38789-vm/.github/workflows/deploy-vps.yml

26 lines
735 B
YAML

name: Deploy to VPS
on:
workflow_run:
workflows: ["Build and Push Web Image", "Build and Push API Image"]
types:
- completed
jobs:
deploy:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Deploy via SSH
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USERNAME }}
key: ${{ secrets.VPS_SSH_KEY }}
script: |
cd pro-se-litigant
git pull
# Login if needed, or assume already logged in
# echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
./deploy.sh