Skip to content
This repository has been archived by the owner on Jan 12, 2025. It is now read-only.

Update CI/CD workflows #127

Merged
merged 10 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: 🚀 Deploy website on releases
name: 🚀 Deploy

on:
release:
types: [published]
push:
branches: [ main ]
workflow_dispatch:

jobs:
Expand All @@ -12,13 +12,24 @@ jobs:
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4


- name: 🔧 Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'

- name: 📦 Install dependencies
run: npm install

- name: Build
run: npm run build

- name: 📂 Sync files
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.fpt_server }}
username: ${{ secrets.fpt_username }}
server: ${{ secrets.ftp_server }}
username: ${{ secrets.ftp_username }}
password: ${{ secrets.ftp_password }}
server-dir: 'MeOS/'
local-dir: 'src/'
local-dir: 'dist/'
security: loose
17 changes: 10 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
- name: 🚚 Get latest code
uses: actions/checkout@v4

- name: Set up Node.js
- name: 🔧 Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'

- name: Install dependencies
run: npm install -g htmlhint
- name: 📦 Install dependencies
run: npm install

- name: Run HTMLHint
run: htmlhint **/*.html
- name: Lint HTML
run: npm run lint:html

- name: Lint CSS
run: npm run lint:css
35 changes: 0 additions & 35 deletions .github/workflows/release.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
17 changes: 17 additions & 0 deletions .htmlhintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"doctype-first": true,
"doctype-html5": true,
"html-lang-require": true,
"title-required": true,
"attr-lowercase": true,
"attr-no-duplication": true,
"attr-no-unnecessary-whitespace": true,
"attr-unsafe-chars": true,
"attr-value-double-quotes": true,
"attr-whitespace": true,
"alt-require": true,
"tagname-lowercase": true,
"src-not-empty": true,
"id-unique": true,
"space-tab-mixed-disabled": "space4"
}
12 changes: 12 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": [
"stylelint-config-standard"
],
"rules": {
"color-no-invalid-hex": true,
"block-no-empty": true,
"unit-no-unknown": true,
"property-no-unknown": true,
"no-duplicate-selectors": null
}
}
Loading
Loading