11ty-coolify-deploy/.gitea/workflows/deploy.yml
Workflow config file is invalid. Please check your config file: yaml: unmarshal errors: line 9: cannot unmarshal !!map into string line 10: cannot unmarshal !!map into string

34 lines
821 B
YAML

name: Deploy to Docker Container
on:
push:
branches:
- main
env:
CONTAINER_NAME: {{ secret.CONTAINER_NAME }}
CONTAINER_IMAGE: {{ secret.CONTAINER_IMAGE }}
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 ${CONTAINER_IMAGE} --build-arg SITE_DIRECTORY=dist .
- name: Remove old Docker container
run: |
docker stop ${CONTAINER_NAME} || true && docker rm ${CONTAINER_NAME} || true
- name: Run Docker container
run: |
docker run -d -p 8086:3000 --name ${CONTAINER_NAME} ${CONTAINER_IMAGE} --restart unless-stopped