Files
rc-portfolio/.drone.yml

36 lines
1.1 KiB
YAML
Raw Normal View History

2025-02-21 15:12:15 -05:00
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
2025-02-23 21:07:50 -05:00
- /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
2025-02-21 15:12:15 -05:00
when:
branch:
2025-02-23 21:07:50 -05:00
- main # Trigger this pipeline only for the main branch