26 lines
662 B
YAML
26 lines
662 B
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Deploy to VPS
|
|
uses: appleboy/ssh-action@v1.0.0
|
|
with:
|
|
host: ${{ secrets.VPS_HOST }}
|
|
username: ${{ secrets.VPS_USER }}
|
|
key: ${{ secrets.VPS_SSH_KEY }}
|
|
script: |
|
|
mkdir -p ~/services/links
|
|
cd ~/services/links
|
|
git clone https://git.ugo-preiswerk.site/${{ gitea.repository }} . 2>/dev/null || git pull
|
|
docker compose -f ~/services/docker-compose.yml restart links 2>/dev/null || true
|