Skip to content

Commit 653ab71

Browse files
author
Ender Karan
committed
cı/cd düzenlemeleri yapildi
1 parent 26573e7 commit 653ab71

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed

.github/workflows/main.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ] # Sadece 'main' branch'ine push yapıldığında çalışır
6+
7+
# Workflow'un depoya yazma izni olmasını sağlar
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
build-and-deploy:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '20.x'
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Build project
30+
run: npm run build
31+
32+
- name: Setup Pages
33+
uses: actions/configure-pages@v4
34+
35+
# Build sonucunda oluşan 'dist' klasörünü bir 'artifact' olarak yükler
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: './dist'
40+
41+
# Yüklenen artifact'i GitHub Pages'de yayınlar
42+
- name: Deploy to GitHub Pages
43+
id: deployment
44+
uses: actions/deploy-pages@v4

public/404.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Prism Dashboard - Redirecting...</title>
6+
<script type="text/javascript">
7+
// Tek sayfa uygulamaları için GitHub Pages yönlendirme hilesi
8+
var segmentCount = 0;
9+
var l = window.location;
10+
l.replace(
11+
l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') +
12+
l.pathname.split('/').slice(0, 1 + segmentCount).join('/') + '/?p=/' +
13+
l.pathname.slice(1).split('/').slice(segmentCount).join('/').replace(/&/g, '~and~') +
14+
(l.search ? '&q=' + l.search.slice(1).replace(/&/g, '~and~') : '') +
15+
l.hash
16+
);
17+
</script>
18+
</head>
19+
<body>
20+
</body>
21+
</html>

vite.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ import tailwindcss from '@tailwindcss/vite'
55
// https://vite.dev/config/
66
export default defineConfig({
77
plugins: [react() , tailwindcss()],
8+
base: '/Prism-Admin-Dashboard/',
89
})

0 commit comments

Comments
 (0)