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

Commit

Permalink
Update CI/CD workflows (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
black-backdoor authored Dec 31, 2024
1 parent e434f5e commit d259bb6
Show file tree
Hide file tree
Showing 8 changed files with 3,197 additions and 49 deletions.
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

0 comments on commit d259bb6

Please sign in to comment.