Skip to content
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
40 changes: 40 additions & 0 deletions .github/workflows/ci-develop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI for Develop Branch

on:
pull_request:
branches: [ develop ]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install HTMLHint
run: npm install -g htmlhint

- name: Install Stylelint and Config
run: npm install -g stylelint stylelint-config-standard

- name: Lint HTML files
run: |
if ls src/*.html 1> /dev/null 2>&1; then
htmlhint src/*.html
else
echo "No HTML files found to lint"
fi

- name: Lint CSS files
run: |
if ls styles/*.css 1> /dev/null 2>&1; then
stylelint styles/*.css
else
echo "No CSS files found to lint"
fi
7 changes: 7 additions & 0 deletions .htmlhintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"tagname-lowercase": true,
"attr-lowercase": true,
"alt-require": true,
"id-unique": true,
"tag-pair": true
}
10 changes: 10 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": ["stylelint-config-standard"],
"rules": {
"declaration-block-no-duplicate-properties": true,
"no-duplicate-selectors": true,
"value-keyword-case": "lower",
"selector-type-case": "lower",
"block-no-empty": true
}
}
18 changes: 18 additions & 0 deletions src/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>my portfolio</title>
<link rel="stylesheet" href="../styles/home.css">
</head>
<body>
<header>
<h1>welcome to my portfolio</h1>
</header>

<main>
<p>this is my portfolio website</p>
<img src="placeholder.jpg" alt="placeholder image">
</main>
</body>
</html>
17 changes: 17 additions & 0 deletions styles/home.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
body {
font-family: arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f5f5f5;
}

header {
background-color: #333;
color: white;
padding: 1rem;
}

h1 {
color: #333;
font-size: 2rem;
}