Add Gitea Actions deploy workflow
All checks were successful
Deploy to Server / deploy (push) Successful in 10s
All checks were successful
Deploy to Server / deploy (push) Successful in 10s
This commit is contained in:
26
.gitea/workflows/deploy.yaml
Normal file
26
.gitea/workflows/deploy.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Deploy to Server
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Deploy to server
|
||||
uses: appleboy/ssh-action@v1.0.3
|
||||
with:
|
||||
host: ${{ secrets.SERVER_HOST }}
|
||||
username: ${{ secrets.SERVER_USER }}
|
||||
key: ${{ secrets.SERVER_SSH_KEY }}
|
||||
script: |
|
||||
cd ~/project/bini-trading-view
|
||||
git pull origin main
|
||||
docker compose down
|
||||
docker compose up -d --build
|
||||
docker image prune -f
|
||||
Reference in New Issue
Block a user