generated from DAM/ts-TEMPLATE
This commit is contained in:
parent
e7e102e4fa
commit
60b537883f
33
.gitea/workflows/deploy.yml
Normal file
33
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,33 @@
|
||||
name: Deploy to DigitalOcean Droplet
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- digital-ocean
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Deploy to DigitalOcean Droplet
|
||||
uses: appleboy/ssh-action@v1.0.3
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USERNAME }}
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
script: |
|
||||
|
||||
git clone ${{ secrets.REPO_URL }} ~/ts-homepage
|
||||
cd ~/ts-homepage
|
||||
|
||||
# Update repo to latest main branch
|
||||
git fetch origin
|
||||
git reset --hard origin/digital-ocean
|
||||
|
||||
# Pull public images and deploy
|
||||
docker compose -f docker-compose.yml pull
|
||||
docker compose -f docker-compose.yml up -d
|
||||
|
||||
# Clean up unused images
|
||||
docker system prune -f
|
Loading…
x
Reference in New Issue
Block a user