Files
nutriapp/.gitea/workflows/deploy.yml
T
joel 05dcae51dd
Build & Deploy NutriApp / build-and-deploy (push) Failing after 3m29s
Fix: instalar libssl-dev y pkg-config para compilar dioxus-cli
2026-06-24 09:47:05 +01:00

57 lines
1.7 KiB
YAML

name: Build & Deploy NutriApp
on:
push:
branches: [main]
jobs:
build-and-deploy:
runs-on: rust-builder
steps:
- name: Install System Dependencies
run: |
apt-get update -qq && apt-get install -y -qq ca-certificates curl nodejs pkg-config libssl-dev
curl -fsSL https://download.docker.com/linux/static/stable/aarch64/docker-27.3.1.tgz | tar xz
cp docker/docker /usr/local/bin/
docker version
node --version
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install dioxus-cli + Build Frontend
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
cargo install dioxus-cli --version 0.6.3
dx --version
cd frontend
dx build --release
- name: Build Backend (Rust)
run: cargo build --release -p nutriapp-backend
- name: Build & Push Docker image
env:
REGISTRY: k3s.proyectosjoel.com
IMAGE_TAG: ${{ gitea.sha }}
run: |
docker build -t $REGISTRY/nutriapp:$IMAGE_TAG -t $REGISTRY/nutriapp:latest -f Dockerfile .
docker push $REGISTRY/nutriapp:$IMAGE_TAG
docker push $REGISTRY/nutriapp:latest
- name: Deploy to k3s
run: |
kubectl apply -f k8s/deployment.yml -n nutriapp
kubectl rollout status deployment/nutriapp -n nutriapp --timeout=120s
kubectl get pods -n nutriapp