ci: add woodpecker pipeline for auto-deployment
Some checks are pending
Deploy Código 0 / deploy (push) Waiting to run
Some checks are pending
Deploy Código 0 / deploy (push) Waiting to run
This commit is contained in:
parent
4f76b0e152
commit
3d2ff44bfa
24
.woodpecker.yml
Normal file
24
.woodpecker.yml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
kind: pipeline
|
||||
name: deploy-codigo0
|
||||
|
||||
steps:
|
||||
deploy:
|
||||
image: appleboy/drone-ssh
|
||||
settings:
|
||||
host:
|
||||
from_secret: SSH_HOST
|
||||
username:
|
||||
from_secret: SSH_USER
|
||||
key:
|
||||
from_secret: SSH_KEY
|
||||
port: 22
|
||||
script:
|
||||
- cd /opt/codigo0
|
||||
- git fetch origin
|
||||
- git reset --hard origin/main
|
||||
- docker compose up -d --build
|
||||
- docker system prune -f
|
||||
|
||||
when:
|
||||
branch: main
|
||||
event: push
|
||||
Loading…
Reference in a new issue