Vibecoded CI/CD
This commit is contained in:
@@ -3,6 +3,10 @@ name: Build and Deploy Nuxt
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
# The Lean editor carries Mathlib and moves on its own schedule — its
|
||||
# image is built and pushed by deploy-lean.yml, only when lean/** changes
|
||||
paths-ignore:
|
||||
- "lean/**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -39,16 +43,13 @@ jobs:
|
||||
docker build -t git.aranroig.com/${{ secrets.REGISTRY_USER }}/mathew-backend:latest ./backend
|
||||
docker push git.aranroig.com/${{ secrets.REGISTRY_USER }}/mathew-backend:latest
|
||||
|
||||
- name: Build lean backend
|
||||
run: |
|
||||
docker build -t git.aranroig.com/${{ secrets.REGISTRY_USER }}/mathew-lean:latest ./lean
|
||||
docker push git.aranroig.com/${{ secrets.REGISTRY_USER }}/mathew-lean:latest
|
||||
|
||||
- name: Copy files
|
||||
run: |
|
||||
scp docker-compose.yml deploy@${{ secrets.DEPLOY_HOST }}:/var/www/app/
|
||||
scp nginx.conf deploy@${{ secrets.DEPLOY_HOST }}:/var/www/app/nginx.conf
|
||||
|
||||
# `compose pull` also pulls the lean image from the registry —
|
||||
# deploy-lean.yml is what keeps that tag current
|
||||
- name: Deploy
|
||||
run: |
|
||||
ssh deploy@${{ secrets.DEPLOY_HOST }} << 'EOF'
|
||||
@@ -57,4 +58,3 @@ jobs:
|
||||
docker compose pull
|
||||
docker compose up -d --remove-orphans
|
||||
EOF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user