11ty-coolify-deploy/.gitea/workflows/deploy.yml
2023-05-26 21:33:06 +02:00

30 lines
694 B
YAML

name: Deploy to Docker Container
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install dependencies and build
run: |
npm ci
npm run production
- name: Build Docker image
run: docker build -t thethomaas/11ty-workflow-example:latest --build-arg SITE_DIRECTORY=dist .
- name: Remove old Docker container
run: |
docker stop dev || true && docker rm dev || true
- name: Run Docker container
run: |
docker run -d -p 8086:80 --name dev thethomaas/11ty-workflow-example:latest