36 lines
811 B
YAML
36 lines
811 B
YAML
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
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|