resources/.forgejo/workflows/graph-updater.yml
Freekkettone 409d1855f9
Some checks failed
Updates the graph by copying the updated files in the right directory / build-and-deploy (push) Failing after 3s
uno dei tentativi per l'hang di ssh
2025-11-14 05:01:42 +01:00

44 lines
1.3 KiB
YAML

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 \
-o StrictHostKeyChecking=no \
-r public/* $SSH_USER@$SSH_HOST:/var/www/miniera.hackinpovo.it/html/