chore: update deploy.yml

This commit is contained in:
2024-12-11 17:59:33 +01:00
parent 96869003af
commit e7c4b068a5

View File

@@ -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