All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 20s
20 lines
563 B
YAML
20 lines
563 B
YAML
name: Build and Deploy
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
pull_request:
|
|
branches: [main, master]
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest # Runner must have Docker socket mounted
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build and run container
|
|
run: |
|
|
docker build -t garcia-inv:latest .
|
|
docker stop garcia-inv 2>/dev/null || true
|
|
docker rm garcia-inv 2>/dev/null || true
|
|
docker run -d --name garcia-inv -p 30001:80 --restart unless-stopped \
|
|
garcia-inv:latest
|