Files
rc-portfolio/.drone.yml
raghu 57c7a44256
All checks were successful
continuous-integration/drone/push Build is passing
add drone.yml
2025-02-21 15:12:15 -05:00

36 lines
1.1 KiB
YAML

kind: pipeline
type: docker
name: rc-portfolio-build-deploy
steps:
# Dockerize the Angular app
- name: dockerize
image: plugins/docker
settings:
registry: hub.chagarlamudi.net
repo: hub.chagarlamudi.net/rc-portfolio
tags: latest
dockerfile: Dockerfile
# Deploy the Docker container to the server
- name: deploy
image: appleboy/drone-ssh
settings:
host:
from_secret: pineapple_gateway
port:
from_secret: tornado_level
username:
from_secret: midnight_owl
password:
from_secret: dragon_scale
script:
- /usr/local/bin/docker pull hub.chagarlamudi.net/rc-portfolio:latest
- /usr/local/bin/docker stop rc-portfolio-container || true # Stop the container if it exists
- /usr/local/bin/docker rm rc-portfolio-container || true # Remove the container
- /usr/local/bin/docker run -d -p 8080:80 --name rc-portfolio-container hub.chagarlamudi.net/rc-portfolio:latest # Start the container
when:
branch:
- main # Trigger this pipeline only for the main branch