This commit is contained in:
parent
2a64013ef7
commit
d2fd88c91e
1 changed files with 22 additions and 0 deletions
22
.forgejo/workflows/deploy.yml
Normal file
22
.forgejo/workflows/deploy.yml
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
name: Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Deploy via SSH
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/id_ed25519
|
||||||
|
chmod 600 ~/.ssh/id_ed25519
|
||||||
|
ssh-keyscan -H ${{ secrets.DEPLOY_HOST }} >> ~/.ssh/known_hosts 2>/dev/null
|
||||||
|
ssh -o StrictHostKeyChecking=no opc@${{ secrets.DEPLOY_HOST }} << 'ENDSSH'
|
||||||
|
cd /home/opc/services/my-favs
|
||||||
|
git pull
|
||||||
|
sudo docker compose up -d --build
|
||||||
|
ENDSSH
|
||||||
|
|
||||||
Loading…
Reference in a new issue