From e7c4b068a514016939768f96cc0478d673730cfc Mon Sep 17 00:00:00 2001 From: Kerboul Date: Wed, 11 Dec 2024 17:59:33 +0100 Subject: [PATCH] chore: update deploy.yml --- .gitea/workflows/deploy.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 06e82b4..f71eaa9 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -9,25 +9,34 @@ jobs: site-check: runs-on: ubuntu-latest - # Linting du code HTML, CSS et JavaScript + # Linting du code HTML, CSS et JavaScript sur un site non Node.js steps: - - name: Checkout repository + - name: Checkout code uses: actions/checkout@v2 - name: Install dependencies - run: npm install + run: | + sudo apt-get update + sudo apt-get install -y w3m + sudo apt-get install -y csslint + sudo apt-get install -y jshint - - name: Lint HTML - run: npx htmlhint . + - name: Check HTML + run: | + w3m -dump -T text/html index.html > /dev/null - - name: Lint CSS - run: npx stylelint "**/*.css" + - name: Check CSS + run: | + csslint styles.css - - name: Lint JavaScript - run: npx eslint . + - name: Check JavaScript + run: | + jshint scripts.js deployment: runs-on: ubuntu-latest # Utilisation de l'image Ubuntu pour l'environnement de job + # Dépend de la réussite de l'action site-check + needs: site-check steps: # Étape 1: Setup SSH - name: Setup SSH and Add Private Key