diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 01263703..21194cb5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,7 +13,50 @@ permissions: concurrency: group: "pages" cancel-in-progress: true +name: Deploy to GitHub Pages + +on: + push: + branches: ["main"] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + base: /rf-meter/ + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: 'npm' + - 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' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 jobs: deploy: environment: diff --git a/vite.config.ts b/vite.config.ts index 92eeca3d..6b8efac1 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,11 +1,11 @@ -import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; -import path from "path"; import { componentTagger } from "lovable-tagger"; +import path from "path"; +import { defineConfig } from "vite"; // https://vitejs.dev/config/ export default defineConfig(({ mode }) => ({ - base: "/rf-sense-o-meter/", + base: "/rf-meter/", server: { host: "::", port: 8080,