Skip to content

Commit 4c77568

Browse files
committed
Add GitHub Pages deployment workflow
1 parent 6f03291 commit 4c77568

27 files changed

Lines changed: 6486 additions & 1603 deletions

.github/workflows/deploy.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: '18'
28+
cache: 'npm'
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Build
34+
run: npm run build
35+
36+
- name: Setup Pages
37+
uses: actions/configure-pages@v4
38+
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: './dist'
43+
44+
deploy:
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
runs-on: ubuntu-latest
49+
needs: build
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

README.md

Lines changed: 138 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,154 @@
1-
# E-Commerce
2-
Creating a E-commerce web app using vue and vuetify
1+
# 🛍️ E-Commerce VueJS
32

4-
# Screenshot
5-
https://imgur.com/O4c5gAs
3+
A modern, responsive e-commerce web application built with Vue.js and Vuetify, featuring a beautiful UI, product browsing, shopping cart, and user authentication.
64

7-
## Live Demo
5+
![Vue.js](https://img.shields.io/badge/Vue.js-2.6.14-brightgreen)
6+
![Vuetify](https://img.shields.io/badge/Vuetify-2.6.0-blue)
7+
![License](https://img.shields.io/badge/License-MIT-yellow)
88

9-
Use a dummy e-mail and password to signup and continue
9+
## ✨ Features
1010

11-
<p>
12-
<a href="https://voidrlm.github.io/E-Commerce-VueJS/#/" target="_blank">Online Demo</a>
13-
</p>
11+
- 🎨 **Modern UI Design** - Clean, responsive interface with Vuetify Material Design components
12+
- 🔐 **Dummy Authentication** - Demo login system (username: `demo`, password: `demopass`)
13+
- 🛒 **Shopping Cart** - Add products, manage quantities, and view order summary
14+
- 🔍 **Advanced Filtering** - Filter products by brand, price, rating, movement, and gender
15+
- 📱 **Fully Responsive** - Works seamlessly on desktop, tablet, and mobile devices
16+
- 🌓 **Dark Mode Support** - Toggle between light and dark themes
17+
- 🎨 **Customizable Themes** - Multiple color schemes to choose from
18+
-**Fast & Lightweight** - Optimized for performance
1419

15-
## Requirements
20+
## 🚀 Live Demo
1621

17-
NodeJS
22+
**[View Live Demo →](https://voidrlm.github.io/E-Commerce-VueJS/#/)**
1823

19-
npm (Node Package Manager)
24+
**Demo Credentials:**
2025

21-
## Installation
26+
- Username: `demo`
27+
- Password: `demopass`
2228

23-
Clone the repository
29+
## 📸 Screenshots
2430

25-
Navigate to the project directory
31+
View screenshots: [https://imgur.com/O4c5gAs](https://imgur.com/O4c5gAs)
2632

27-
Install the dependencies
33+
## 🛠️ Built With
2834

29-
``
30-
$ npm install
31-
``
35+
- **[Vue.js 2.6](https://vuejs.org/)** - Progressive JavaScript framework
36+
- **[Vuetify 2.6](https://vuetifyjs.com/)** - Material Design component framework
37+
- **[Vue Router](https://router.vuejs.org/)** - Official router for Vue.js
38+
- **[Vuex](https://vuex.vuejs.org/)** - State management library
39+
- **[Vue Cookies](https://www.npmjs.com/package/vue-cookies)** - Cookie plugin
3240

33-
Start the development server
41+
## 📋 Prerequisites
3442

35-
``
36-
$ npm run serve
37-
``
43+
Before you begin, ensure you have the following installed:
3844

39-
Open a web browser and navigate to http://localhost:8080
45+
- **Node.js** (v12 or higher)
46+
- **npm** (Node Package Manager)
4047

41-
## Built With
42-
VueJS - JavaScript framework for building user interfaces
43-
Vuetify - Material Design component framework for VueJS
48+
## 🔧 Installation
49+
50+
1. **Clone the repository**
51+
52+
```bash
53+
git clone https://github.com/voidrlm/E-Commerce-VueJS.git
54+
cd E-Commerce-VueJS
55+
```
56+
57+
2. **Install dependencies**
58+
59+
```bash
60+
npm install
61+
```
62+
63+
3. **Start the development server**
64+
65+
```bash
66+
npm run serve
67+
```
68+
69+
4. **Open your browser**
70+
71+
Navigate to [http://localhost:8080](http://localhost:8080)
72+
73+
## 📦 Building for Production
74+
75+
Build the project for production:
76+
77+
```bash
78+
npm run build
79+
```
80+
81+
The production-ready files will be in the `dist` directory.
82+
83+
## 🚢 Deployment to GitHub Pages
84+
85+
Deploy your application to GitHub Pages using the provided PowerShell script:
86+
87+
```powershell
88+
./deploy-gh-pages.ps1
89+
```
90+
91+
This script will:
92+
93+
1. Build the project
94+
2. Initialize a new git repository in the `dist` folder
95+
3. Push the build to the `gh-pages` branch
96+
4. Your site will be available at `https://<your-username>.github.io/<your-repo>/`
97+
98+
## 📁 Project Structure
99+
100+
```
101+
E-Commerce-VueJS/
102+
├── public/ # Static assets
103+
├── src/
104+
│ ├── assets/ # Images and static files
105+
│ ├── components/ # Reusable Vue components
106+
│ │ ├── navigation/
107+
│ │ ├── shoppingCart/
108+
│ │ └── userManagement/
109+
│ ├── plugins/ # Vuetify configuration
110+
│ ├── resources/ # Product database
111+
│ ├── router/ # Vue Router configuration
112+
│ ├── services/ # Utility services
113+
│ ├── store/ # Vuex store
114+
│ ├── views/ # Page components
115+
│ ├── App.vue # Root component
116+
│ └── main.js # Application entry point
117+
├── package.json
118+
├── vue.config.js
119+
└── README.md
120+
```
121+
122+
## 🎨 Available Scripts
123+
124+
- `npm run serve` - Start development server
125+
- `npm run build` - Build for production
126+
- `npm run lint` - Lint and fix files
127+
128+
## 🤝 Contributing
129+
130+
Contributions are welcome! Feel free to submit issues and pull requests.
131+
132+
1. Fork the project
133+
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
134+
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
135+
4. Push to the branch (`git push origin feature/AmazingFeature`)
136+
5. Open a Pull Request
137+
138+
## 📝 License
139+
140+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
141+
142+
## 👤 Author
143+
144+
**voidrlm**
145+
146+
- GitHub: [@voidrlm](https://github.com/voidrlm)
147+
148+
## ⭐ Show your support
149+
150+
Give a ⭐️ if you like this project!
151+
152+
---
153+
154+
Made with ❤️ using Vue.js and Vuetify

deploy-gh-pages.ps1

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# PowerShell script to deploy VueJS app to GitHub Pages
2+
# Usage: ./deploy-gh-pages.ps1
3+
4+
Write-Host "Building the project..." -ForegroundColor Cyan
5+
npm run build
6+
7+
if ($LASTEXITCODE -ne 0) {
8+
Write-Host "Build failed! Exiting..." -ForegroundColor Red
9+
exit 1
10+
}
11+
12+
Write-Host "Build successful!" -ForegroundColor Green
13+
14+
# Navigate to the build output directory
15+
Set-Location dist
16+
17+
# Initialize a new git repository in the dist folder
18+
git init
19+
git add -A
20+
git commit -m "Deploy to GitHub Pages"
21+
22+
# Force push to the gh-pages branch
23+
Write-Host "Deploying to GitHub Pages..." -ForegroundColor Cyan
24+
git push -f git@github.com:voidrlm/E-Commerce-VueJS.git main:gh-pages
25+
26+
# Go back to the project root
27+
Set-Location ..
28+
29+
Write-Host "Deployment complete! Your site should be available at:" -ForegroundColor Green
30+
Write-Host "https://voidrlm.github.io/E-Commerce-VueJS/" -ForegroundColor Yellow

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"scripts": {
66
"serve": "vue-cli-service serve",
77
"build": "vue-cli-service build",
8-
"lint": "vue-cli-service lint"
8+
"lint": "vue-cli-service lint",
9+
"deploy": "npm run build && gh-pages -d dist"
910
},
1011
"dependencies": {
1112
"core-js": "^3.8.3",

0 commit comments

Comments
 (0)