added gh actions for deploying to gh pages
Some checks failed
Deploy to GitHub Pages / deploy (push) Has been cancelled
Some checks failed
Deploy to GitHub Pages / deploy (push) Has been cancelled
This commit is contained in:
30
.github/workflows/main.yml
vendored
Normal file
30
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Deploy to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"] # Replace with your default branch if different
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "lts/*" # Uses the latest LTS version
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Build
|
||||
run: npx vite build
|
||||
|
||||
- name: Move dist to public
|
||||
run: |
|
||||
rm -rf public
|
||||
mv dist public
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: actions/deploy-pages@v3
|
||||
Reference in New Issue
Block a user