From 53d8de49b077349ef9c346d39c3921458e58448e Mon Sep 17 00:00:00 2001 From: DFFM-maker Date: Fri, 2 Jan 2026 15:54:50 +0100 Subject: [PATCH] Fix: Usa options per il mount del volume1 --- .github/workflows/deploy.yml | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f9f4e60..59750bd 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,26 +10,13 @@ jobs: runs-on: docker container: image: node:20-bookworm - # 👇 QUESTA È LA CHIAVE: Montiamo la cartella fisica del server dentro il container Node - options: --volume /opt/forgejo/sites/docs:/deploy/docs - #volumes: - # - /opt/forgejo/sites/docs:/deploy/docs steps: - name: Checkout del codice uses: actions/checkout@v4 - - name: Cache Node Modules - id: cache-npm - uses: actions/cache@v3 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - name: Installazione Dipendenze - run: npm ci + run: npm install - name: Build Docusaurus run: | @@ -41,14 +28,16 @@ jobs: TARGET_DIR="/deploy/docs" echo "Inizio deploy su $TARGET_DIR..." + # Crea la directory se non esiste + mkdir -p $TARGET_DIR + # Pulisce la cartella di destinazione - # (Attenzione: rm -rf su cartella montata cancella i file reali sul server!) rm -rf $TARGET_DIR/* # Copia i nuovi file cp -r build/* $TARGET_DIR/ - # 👇 SICUREZZA PERMESSI: Assicuriamoci che Nginx possa leggerli + # Permessi per Nginx chmod -R 755 $TARGET_DIR - echo "Deploy completato con successo e permessi aggiornati!" \ No newline at end of file + echo "Deploy completato con successo!" \ No newline at end of file