From 02b2b75e20d434e831ae3f361738d3829433e332 Mon Sep 17 00:00:00 2001 From: Amaan-Samar Date: Mon, 4 Nov 2024 21:20:59 -0800 Subject: [PATCH] Reset build and try again --- .github/workflows/deploy.yml | 27 +++++++++++---------------- vite.config.js | 17 +++++++++++++++-- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 19bebbd..6f9e999 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,37 +3,32 @@ name: Deploy to GitHub Pages on: push: branches: - - main + - main # or your default branch name permissions: contents: write jobs: - deploy: - timeout-minutes: 15 + build-and-deploy: runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - persist-credentials: false + - name: Checkout + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '18' - cache: 'npm' + node-version: '18' # or your preferred version - - name: Install dependencies - run: npm ci + - name: Install Dependencies + run: npm install - name: Build run: npm run build - - name: Deploy to GitHub Pages + - name: Deploy uses: JamesIves/github-pages-deploy-action@v4 with: - folder: dist + folder: dist # The folder the action will deploy from branch: gh-pages - clean: true + clean: true # Automatically remove deleted files from the deployment diff --git a/vite.config.js b/vite.config.js index 0a942d2..3090714 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,8 +1,21 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' -// https://vitejs.dev/config/ export default defineConfig({ plugins: [vue()], - base: '/chinese-writing-assistant/', // Replace with your repository name + base: '/chinese-writing-assistant/', + build: { + outDir: 'dist', + assetsDir: 'assets', + // Ensure clean builds + emptyOutDir: true, + // Add source maps for better debugging + sourcemap: true, + // Increase build timeout + timeout: 120000, + }, + server: { + port: 3000, + open: true, + }, })