Skip to content

Commit 9639b78

Browse files
Harshith ReddyHarshith Reddy
authored andcommitted
Add GitHub Pages deployment
1 parent 1416f1f commit 9639b78

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/deploy.yml

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

vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { defineConfig } from "vite";
22
import react from "@vitejs/plugin-react";
33

44
export default defineConfig({
5+
base: "/Polyp-Frontend/",
56
plugins: [react()],
67
server: {
78
proxy: {

0 commit comments

Comments
 (0)