resources/.forgejo/workflows/graph-updater.yml
Freekkettone 3b46f3d5b1
Some checks failed
Updates the graph by copying the updated files in the right directory / build-and-deploy (push) Failing after 2s
fix: i file, una volta validati, vengono ora copiati sulla macchina proxi con ssh
2025-11-14 03:36:09 +01:00

35 lines
965 B
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:
# Checkout means: tirati giù la repo in locale
- name: Checkout repository
uses: actions/checkout@v4
- name: Install jq if needed (used to validate json files)
run: sudo apt-get update && sudo apt-get 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
- name: Copy files to reverse proxy
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.PROXY_HOST }}
username: ${{ secrets.PROXY_USER }}
key: ${{ secrets.PROXY_SSH_KEY }}
script: |
cp -r /home/proxi/resources/public/* /var/www/miniera.hackinpovo.it/html/