From a2669c2629ea00235b2fcd7578c065d443291417 Mon Sep 17 00:00:00 2001 From: wheattoast11 Date: Wed, 20 Nov 2024 13:34:31 -0600 Subject: [PATCH] vite --- .github/workflows/deploy.yml | 48 +++++++++++------------------------- vite.config.js | 3 ++- 2 files changed, 17 insertions(+), 34 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6cb65ed..cb5df4a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,53 +2,35 @@ name: Deploy to GitHub Pages on: push: - branches: [ main ] + branches: [ "main" ] workflow_dispatch: -# Allow only one concurrent deployment -concurrency: - group: "pages" - cancel-in-progress: true - permissions: - contents: read + contents: write pages: write id-token: write jobs: - build: + build-and-deploy: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - - - name: Set up Node + + - name: Install Node.js uses: actions/setup-node@v4 with: node-version: 18 - cache: 'npm' - - - name: Install dependencies - run: npm ci - + + - name: Install Dependencies + run: npm install + - name: Build run: npm run build - - - name: Setup Pages - uses: actions/configure-pages@v4 - - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: './dist' - - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - steps: + - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 \ No newline at end of file + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: dist + branch: gh-pages + clean: true \ No newline at end of file diff --git a/vite.config.js b/vite.config.js index c5c26fd..3ac4da0 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,9 +1,10 @@ import { defineConfig } from 'vite' export default defineConfig({ - base: '/', + base: '/wheattoast11.github.io/', // Add your repository name build: { outDir: 'dist', assetsDir: 'assets', + sourcemap: true } }) \ No newline at end of file