Bascule du domaine principal vers rubis.pro / app.rubis.pro : - K3s ConfigMaps (api.yml, web.yml) : APP_URL, WEB_URL, COOKIE_DOMAIN, OAUTH callbacks pointent vers app.rubis.pro - Dockerfile.web : ARG VITE_API_URL et VITE_PUBLIC_LANDING_URL - Workflows Gitea : commentaires + build args web → rubis.pro - Code API (mail_dispatcher, send_test_email, config/mail) : defaults env LANDING_URL et MAIL_FROM_ADDRESS migrés - Templates env (.env.example) idem - Docs (architecture, backend, frontend, brand-identity) idem - AGENTS.md / CLAUDE.md / deploy-memory : pointeurs domaine MAJ Note : MAIL_FROM_ADDRESS dans le secret K3s reste sur rubis@arthurbarre.fr tant que le domaine rubis.pro n'est pas Verified dans Resend. À switcher manuellement après vérif Resend. Compat : un 301 Traefik redirige rubis.arthurbarre.fr → rubis.pro (et app.X aussi) — config Ansible dans le repo proxmox. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
72 lines
2.1 KiB
YAML
72 lines
2.1 KiB
YAML
name: Build & Deploy Landing
|
|
|
|
# Workflow pour la landing static (rubis.pro).
|
|
# L'app SaaS (apps/api + apps/web) a son propre workflow : deploy-app.yml.
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'landing/**'
|
|
- 'Dockerfile'
|
|
- 'k3s/namespace.yml'
|
|
- 'k3s/deployment.yml'
|
|
- 'k3s/service.yml'
|
|
- '.gitea/workflows/deploy.yml'
|
|
|
|
env:
|
|
REGISTRY: git.arthurbarre.fr
|
|
IMAGE: ordinarthur/rubis
|
|
NAMESPACE: rubis
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Login to Gitea Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ordinarthur
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Build and push image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: Dockerfile
|
|
push: true
|
|
tags: |
|
|
${{ env.REGISTRY }}/${{ env.IMAGE }}:latest
|
|
${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ github.sha }}
|
|
|
|
- name: Install kubectl
|
|
run: |
|
|
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
|
chmod +x kubectl
|
|
mv kubectl /usr/local/bin/
|
|
|
|
- name: Deploy to K3s
|
|
run: |
|
|
mkdir -p ~/.kube
|
|
echo "${{ secrets.KUBECONFIG }}" | base64 -d > ~/.kube/config
|
|
chmod 600 ~/.kube/config
|
|
|
|
kubectl apply -f k3s/namespace.yml
|
|
|
|
kubectl -n $NAMESPACE create secret docker-registry gitea-registry \
|
|
--docker-server=$REGISTRY \
|
|
--docker-username=ordinarthur \
|
|
--docker-password=${{ secrets.REGISTRY_PASSWORD }} \
|
|
--dry-run=client -o yaml | kubectl apply -f -
|
|
|
|
kubectl apply -f k3s/deployment.yml
|
|
kubectl apply -f k3s/service.yml
|
|
|
|
kubectl -n $NAMESPACE set image deployment/rubis \
|
|
rubis=$REGISTRY/$IMAGE:${{ github.sha }}
|
|
|
|
kubectl -n $NAMESPACE rollout status deployment/rubis --timeout=120s
|