From bd77efa0e6765f8c5152aaa453e491f4260fb33b Mon Sep 17 00:00:00 2001 From: Hayleigh Thompson Date: Sun, 20 Aug 2023 14:38:43 +0100 Subject: :wrench: Add vite-plugin-gh-pages and configure deploys on build. --- docs/vite.config.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'docs/vite.config.js') diff --git a/docs/vite.config.js b/docs/vite.config.js index 95675a5..555777e 100644 --- a/docs/vite.config.js +++ b/docs/vite.config.js @@ -1,5 +1,14 @@ +import { defineConfig } from "vite"; +import { ghPages } from "vite-plugin-gh-pages"; import gleam from "vite-gleam"; -export default { - plugins: [gleam()], -}; +export default defineConfig(({ command }) => ({ + base: command === "build" ? "/gleam-lustre/" : "/", + plugins: [ + gleam(), + ghPages({ + branch: "docs", + message: "🚀 Deploy to gh-pages.", + }), + ], +})); -- cgit v1.2.3