name: Updates the graph by copying the updated files in the right directory on: push: branches: - main jobs: build-and-deploy: runs-on: usainbolt steps: #DA QUI IN POI, RICORDA CHE È COME SE FOSSI SUL GITRUNNER usainbolt # Checkout means: mi tiro giù la repo in locale - name: Checkout repository uses: actions/checkout@v4 # - name: Apt update # run: | # sudo apt update # # - name: Install jq if needed (used to validate json files) # run: | # sudo apt install -y jq - name: Validate arf.json run: | if ! jq empty public/arf.json; then echo "❌ arf.json non è un JSON valido" exit 1 fi shell: bash # Fanculo i pacchetti già pronti per usare ssh su questi yml # (tieni a mente che con questa sola copia la repo su proxi rimane outdated perché viene fatta la copia direttamente dentro /var/www senza toccare ~/resources) - name: Copy files to reverse proxy /var/www/... env: SSH_USER: ${{ secrets.PROXY_USER }} SSH_HOST: ${{ secrets.PROXY_HOST }} run: | scp -i /root/.ssh/id_ed25519 public/* $SSH_USER@$SS_HOST:/var/www/miniera.hackinpovo.it/html/