From eeaf7e714f6cc6265d5ed03e9ddd3c869f25fdc4 Mon Sep 17 00:00:00 2001 From: Aditya Vaish Date: Sun, 2 Nov 2025 19:15:46 +0530 Subject: [PATCH] deployment issues fixed --- .github/workflows/deploy.yml | 39 ++++++++++++++++++ Slot-Booking-System-Frontend/package.json | 1 + Slot-Booking-System-Frontend/public/404.html | 43 ++++++++++++++++++++ Slot-Booking-System-Frontend/vite.config.js | 1 + 4 files changed, 84 insertions(+) create mode 100644 .github/workflows/deploy.yml create mode 100644 Slot-Booking-System-Frontend/public/404.html diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..78e8bfd --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,39 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + cache: 'npm' + cache-dependency-path: './Slot-Booking-System-Frontend/package-lock.json' + + - name: Install dependencies + run: | + cd Slot-Booking-System-Frontend + npm ci + + - name: Build + run: | + cd Slot-Booking-System-Frontend + npm run build + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./Slot-Booking-System-Frontend/dist diff --git a/Slot-Booking-System-Frontend/package.json b/Slot-Booking-System-Frontend/package.json index da55abb..f39aa13 100644 --- a/Slot-Booking-System-Frontend/package.json +++ b/Slot-Booking-System-Frontend/package.json @@ -3,6 +3,7 @@ "private": true, "version": "0.0.0", "type": "module", + "homepage": "https://ossdaiict.github.io/SLoP5.0-Slot-Booking-System/", "scripts": { "dev": "vite", "build": "vite build", diff --git a/Slot-Booking-System-Frontend/public/404.html b/Slot-Booking-System-Frontend/public/404.html new file mode 100644 index 0000000..e4230b9 --- /dev/null +++ b/Slot-Booking-System-Frontend/public/404.html @@ -0,0 +1,43 @@ + + + + + + + slot-booking-system + + + +
+ + + + + diff --git a/Slot-Booking-System-Frontend/vite.config.js b/Slot-Booking-System-Frontend/vite.config.js index e4d40b5..dc0bcc2 100644 --- a/Slot-Booking-System-Frontend/vite.config.js +++ b/Slot-Booking-System-Frontend/vite.config.js @@ -4,4 +4,5 @@ import tailwindcss from '@tailwindcss/vite' // https://vite.dev/config/ export default defineConfig({ plugins: [react(), tailwindcss()], + base: '/SLoP5.0-Slot-Booking-System/', })