diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..7fd073e --- /dev/null +++ b/.github/workflows/main.yml @@ -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