31 lines
635 B
YAML
31 lines
635 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 11ty-workflow-example --build-arg SITE_DIRECTORY=dist .
|
|
|
|
- name: Set up Docker Compose
|
|
uses: docker/compose-action@v1
|
|
with:
|
|
compose-file: docker-compose.yml
|
|
|
|
- name: Start Docker Compose services
|
|
run: docker-compose up -d
|