ci: deploy all services with Docker layer cache
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
name: Deploy api_yal
|
||||
name: Deploy
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Pull latest main
|
||||
@@ -13,8 +13,11 @@ jobs:
|
||||
cd /home/gaziz/artefacts/tp
|
||||
git pull origin main
|
||||
|
||||
- name: Rebuild api_yal and redeploy
|
||||
- name: Rebuild changed services
|
||||
run: |
|
||||
cd /home/gaziz/artefacts/tp/main_dc
|
||||
docker compose build api_yal --no-cache
|
||||
docker compose up api_yal -d
|
||||
docker compose build
|
||||
docker compose up -d --remove-orphans
|
||||
|
||||
- name: Cleanup old images
|
||||
run: docker image prune -f
|
||||
|
||||
Reference in New Issue
Block a user