Skip to content

Create deploy-dev.yml #1

Create deploy-dev.yml

Create deploy-dev.yml #1

Workflow file for this run

name: Deploy to Development
on:
push:
branches:
- main
jobs:
deploy:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build Docker image
run: |
# Build the Docker image and tag it with "latest"
docker build -t myapp:latest .
- name: Stop and remove existing container
run: |
# If there's an existing container, stop and remove it.
docker rm -f myapp_container || true
- name: Run Docker container
run: |
# Run the new container in detached mode, mapping port 80
docker run -d --name myapp_container -p 80:80 myapp:latest