fix: i file, una volta validati, vengono ora copiati sulla macchina proxi con ssh
Some checks failed
Updates the graph by copying the updated files in the right directory / build-and-deploy (push) Failing after 2s
Some checks failed
Updates the graph by copying the updated files in the right directory / build-and-deploy (push) Failing after 2s
This commit is contained in:
parent
38d838ad6b
commit
3b46f3d5b1
1 changed files with 15 additions and 8 deletions
|
|
@ -1,4 +1,4 @@
|
|||
name: Updates the graph by copying the updated files in the rigth directory
|
||||
name: Updates the graph by copying the updated files in the right directory
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
@ -8,13 +8,16 @@ on:
|
|||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: usainbolt
|
||||
|
||||
steps:
|
||||
# 1. Checkout del codice (scarica la repo usando checkout@v4: un insieme di comandi prefatto)
|
||||
# Checkout means: tirati giù la repo in locale
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# 1. Validazione del JSON
|
||||
- name: Validate arf.json (the file with the content of the graph)
|
||||
- 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"
|
||||
|
|
@ -22,7 +25,11 @@ jobs:
|
|||
fi
|
||||
shell: bash
|
||||
|
||||
# 2. Copia dei files da public in var/www/...
|
||||
- name: File copy to update web page
|
||||
run: |
|
||||
cp -r public/* /var/www/miniera.hackinpovo.it/html/
|
||||
- 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/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue