ajout style
This commit is contained in:
@@ -1,48 +1,48 @@
|
|||||||
# Le fichier .gitea-ci.yml pour Gitea CI/CD
|
# Le fichier .gitea-ci.yml pour Gitea CI/CD
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main # Déclenche l'action pour la branche principale
|
- main # Déclenche l'action pour la branche principale
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
deployment:
|
deployment:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
# Étape 1: Setup SSH
|
# Étape 1: Setup SSH
|
||||||
- name: Setup SSH and Add Private Key
|
- name: Setup SSH and Add Private Key
|
||||||
run: |
|
run: |
|
||||||
# Créez un dossier pour stocker les clés SSH
|
# Créez un dossier pour stocker les clés SSH
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
|
|
||||||
# Ajoutez la clé privée stockée dans le secret à un fichier id_rsa
|
# Ajoutez la clé privée stockée dans le secret à un fichier id_rsa
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
||||||
|
|
||||||
# Protéger les permissions du fichier de la clé privée
|
# Protéger les permissions du fichier de la clé privée
|
||||||
chmod 600 ~/.ssh/id_rsa
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
|
||||||
# Ajoutez l'hôte distant à known_hosts pour éviter les erreurs de vérification de l'host
|
# Ajoutez l'hôte distant à known_hosts pour éviter les erreurs de vérification de l'host
|
||||||
ssh-keyscan -H 192.168.1.87 >> ~/.ssh/known_hosts
|
ssh-keyscan -H 192.168.1.87 >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
# Vérifiez les permissions du fichier id_rsa (optionnel, juste pour être sûr)
|
# Vérifiez les permissions du fichier id_rsa (optionnel, juste pour être sûr)
|
||||||
ls -l ~/.ssh/id_rsa
|
ls -l ~/.ssh/id_rsa
|
||||||
|
|
||||||
# Étape 2: Test SSH Connection
|
# Étape 2: Test SSH Connection
|
||||||
- name: Test SSH connection
|
- name: Test SSH connection
|
||||||
run: |
|
run: |
|
||||||
# Testez la connexion SSH avec l'hôte distant
|
# Testez la connexion SSH avec l'hôte distant
|
||||||
ssh -v kerboul@192.168.1.87 "echo 'Connection successful!'"
|
ssh -v kerboul@192.168.1.87 "echo 'Connection successful!'"
|
||||||
|
|
||||||
# Étape 3: Ajouter une action qui utilise la connexion SSH
|
# Étape 3: Ajouter une action qui utilise la connexion SSH
|
||||||
- name: Run remote command
|
- name: Run remote command
|
||||||
run: |
|
run: |
|
||||||
# Exemple de commande distante exécutée sur le serveur distant via SSH
|
# Exemple de commande distante exécutée sur le serveur distant via SSH
|
||||||
ssh kerboul@192.168.1.87 "cd /home/kerboul/scripts/timelapse && ./update_timelapse.sh -o"
|
ssh kerboul@192.168.1.87 "cd /home/kerboul/scripts/timelapse && ./update_timelapse.sh -o"
|
||||||
|
|
||||||
# Étape 4: Nettoyage (optionnel)
|
# Étape 4: Nettoyage (optionnel)
|
||||||
- name: Clean up SSH keys
|
- name: Clean up SSH keys
|
||||||
run: |
|
run: |
|
||||||
# Supprimer la clé privée pour des raisons de sécurité (optionnel)
|
# Supprimer la clé privée pour des raisons de sécurité (optionnel)
|
||||||
rm -f ~/.ssh/id_rsa
|
rm -f ~/.ssh/id_rsa
|
||||||
rm -f ~/.ssh/known_hosts
|
rm -f ~/.ssh/known_hosts
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="buttons-container" style="float: left; width: 20%">
|
<div class="buttons-container" style="float: left; width: 20%">
|
||||||
<button id="projets" >
|
<button class="btn btn-primary" id="projets" >
|
||||||
<span> Home </span>
|
<span> Home </span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -48,20 +48,20 @@
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div id="content1" class="hiddenTable">
|
<div id="content1" class="hiddenTable">
|
||||||
<table
|
<table
|
||||||
class="table table-striped scrollable sticky-header"
|
class="table table-striped scrollable sticky-header .thead-dark"
|
||||||
id="table-image"
|
id="table-image"
|
||||||
>
|
>
|
||||||
<thead>
|
<thead >
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
<button id="toggle-view">
|
<button class="btn btn-primary" id="toggle-view">
|
||||||
See all images
|
See all images
|
||||||
</button>
|
</button>
|
||||||
</th>
|
</th>
|
||||||
<th><button>
|
<th><button class="btn btn-primary">
|
||||||
sort images
|
sort images
|
||||||
</button></th>
|
</button></th>
|
||||||
<th><button>
|
<th><button class="btn btn-primary">
|
||||||
export images
|
export images
|
||||||
</button></th>
|
</button></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<div id="section"></div>
|
<div id="section"></div>
|
||||||
<div class="buttons-container">
|
<div class="buttons-container">
|
||||||
<button id="projets" ><span>
|
<button class="btn btn-primary" id="projets" ><span>
|
||||||
Mes projets
|
Mes projets
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
<body>
|
<body>
|
||||||
<div id="section" class="container mt-5">
|
<div id="section" class="container mt-5">
|
||||||
<div class="buttons-container mb-4">
|
<div class="buttons-container mb-4">
|
||||||
<button id="video" ><span>Mes vidéos</span></button>
|
<button class="btn btn-primary" id="video" ><span>Mes vidéos</span></button>
|
||||||
<button id="download" ><span>Download App</span></button>
|
<button class="btn btn-primary" id="download" ><span>Download App</span></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<table class="table table-striped" id="table-projects">
|
<table class="table table-striped" id="table-projects">
|
||||||
|
|||||||
@@ -18,13 +18,13 @@ function display_metrics(metrics_datas) {
|
|||||||
document.addEventListener("DOMContentLoaded", () => {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
const projectId = urlParams.get("id");
|
const projectId = urlParams.get("id");
|
||||||
getDataProjectMetricsFromApi(projectId)
|
// getDataProjectMetricsFromApi(projectId)
|
||||||
.then((project_metrics) => {
|
// .then((project_metrics) => {
|
||||||
display_metrics(project_metrics);
|
// display_metrics(project_metrics);
|
||||||
})
|
// })
|
||||||
.catch((error) => {
|
// .catch((error) => {
|
||||||
console.error(error);
|
// console.error(error);
|
||||||
});
|
// });
|
||||||
document.getElementById("projets").addEventListener("click", () => {
|
document.getElementById("projets").addEventListener("click", () => {
|
||||||
window.location.href = "../index.html";
|
window.location.href = "../index.html";
|
||||||
current_project = "";
|
current_project = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user