Skip to content

Commit

Permalink
vite
Browse files Browse the repository at this point in the history
  • Loading branch information
wheattoast11 committed Nov 20, 2024
1 parent 81e459f commit a2669c2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 34 deletions.
48 changes: 15 additions & 33 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
branch: gh-pages
clean: true
3 changes: 2 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
@@ -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
}
})

0 comments on commit a2669c2

Please sign in to comment.