Files
epess-web-backend/.github/workflows/ci.yml
Ly Tuan Kiet 253dbc783b chore: simplify Docker Compose commands in CI workflow
- Updated the CI workflow to streamline Docker Compose commands by replacing separate build and up commands with a single `docker compose up --build -d` command. This change enhances the efficiency of the CI process by reducing the number of steps required to start the services.
2024-12-05 18:46:28 +07:00

30 lines
775 B
YAML

name: CI
# Controls when the workflow will run
on:
push:
branches: ['main']
pull_request:
branches: ['main']
workflow_dispatch:
jobs:
build:
runs-on: self-hosted
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository with submodules
uses: actions/checkout@v4
with:
submodules: true # Recursively clone submodules
token: ${{ secrets.PAT }}
fetch-depth: 0 # Fetch full history to avoid issues with shallow clones
# Pull the latest version of base images and rebuild without cache
- name: Build and deploy
run: |
docker compose pull
docker compose down
docker compose up --build -d