FIX: Ajustado pasta raiz do projeto para evitar problemas de permissão
Some checks failed
Deploy WiFi-ETL Prod / deploy (push) Failing after 1s
Some checks failed
Deploy WiFi-ETL Prod / deploy (push) Failing after 1s
This commit is contained in:
parent
6a36a1ecef
commit
bf9ae6100a
@ -13,38 +13,39 @@ jobs:
|
||||
|
||||
- name: Preparar ambiente
|
||||
run: |
|
||||
sudo mkdir -p /opt/wifi-etl
|
||||
sudo chown $(whoami):$(whoami) /opt/wifi-etl
|
||||
mkdir -p /home/desenvolvimento/wifi-etl
|
||||
chown $(whoami):$(whoami) /home/desenvolvimento/wifi-etl
|
||||
|
||||
|
||||
- name: Garantindo safe directory
|
||||
run: |
|
||||
git config --global --add safe.directory /opt/wifi-etl
|
||||
git config --global --add safe.directory /home/desenvolvimento/wifi-etl
|
||||
|
||||
- name: Clone/Update código
|
||||
run: |
|
||||
set -e
|
||||
if [ -d /opt/wifi-etl/.git ]; then
|
||||
cd /opt/wifi-etl
|
||||
if [ -d /home/desenvolvimento/wifi-etl/.git ]; then
|
||||
cd /home/desenvolvimento/wifi-etl
|
||||
git fetch origin
|
||||
git reset --hard origin/main
|
||||
git clean -fd
|
||||
else
|
||||
git clone http://10.0.120.75:3030/SEU_USUARIO/wifi-etl.git /opt/wifi-etl
|
||||
git clone http://10.0.120.75:3030/SEU_USUARIO/wifi-etl.git /home/desenvolvimento/wifi-etl
|
||||
fi
|
||||
echo "✓ Código atualizado"
|
||||
|
||||
- name: Copiar .env
|
||||
run: |
|
||||
set -e
|
||||
cp /home/desenvolvimento/.envs/wifi_etl/.env /opt/wifi-etl/.env
|
||||
cp /home/desenvolvimento/.envs/wifi_etl/.env /home/desenvolvimento/wifi-etl/.env
|
||||
echo "✓ .env copiado"
|
||||
|
||||
- name: Build e deploy container
|
||||
run: |
|
||||
set -e
|
||||
cd /opt/wifi-etl
|
||||
docker-compose -f infra/docker-compose.prod.yml down
|
||||
cd /home/desenvolvimento/wifi-etl
|
||||
docker system prune -f || true
|
||||
docker-compose -f infra/docker-compose.prod.yml down || true
|
||||
docker-compose -f infra/docker-compose.prod.yml build --no-cache
|
||||
docker-compose -f infra/docker-compose.prod.yml up -d
|
||||
echo "✓ Container iniciado"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user