aggiunta validazione del json prima di updatare il sito
Some checks failed
Updates the graph by copying the updated files in the rigth directory / build-and-deploy (push) Failing after 2s
Some checks failed
Updates the graph by copying the updated files in the rigth directory / build-and-deploy (push) Failing after 2s
This commit is contained in:
parent
5f16b7e2a1
commit
38d838ad6b
1 changed files with 11 additions and 4 deletions
|
|
@ -3,19 +3,26 @@ name: Updates the graph by copying the updated files in the rigth directory
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
runs-on: usainbolt
|
runs-on: usainbolt
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
# 1. Checkout del codice (scarica la repo usando checkout@v4: un insieme di comandi prefatto)
|
# 1. Checkout del codice (scarica la repo usando checkout@v4: un insieme di comandi prefatto)
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# 1. Validazione del JSON
|
||||||
|
- name: Validate arf.json (the file with the content of the graph)
|
||||||
|
run: |
|
||||||
|
if ! jq empty public/arf.json; then
|
||||||
|
echo "❌ arf.json non è un JSON valido"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
|
||||||
# 2. Copia dei files da public in var/www/...
|
# 2. Copia dei files da public in var/www/...
|
||||||
- name:
|
- name: File copy to update web page
|
||||||
run: |
|
run: |
|
||||||
cp -r public/* /var/www/miniera.hackinpovo.it/html/
|
cp -r public/* /var/www/miniera.hackinpovo.it/html/
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue