From a77da60cb23a898e7ff6f9053e52a5116a066c95 Mon Sep 17 00:00:00 2001 From: Ruslan Makarov Date: Wed, 31 Jan 2024 11:14:13 +0300 Subject: [PATCH 1/3] feat: GitHub pages deployment --- .github/workflows/gp-deploy.yaml | 33 ++++++++++++++++++++++++++++++++ src/TimelineItemIssues.vue | 10 ++++++---- src/UserBadge.vue | 2 +- vite.config.ts | 9 +++++---- 4 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/gp-deploy.yaml diff --git a/.github/workflows/gp-deploy.yaml b/.github/workflows/gp-deploy.yaml new file mode 100644 index 0000000..394cabe --- /dev/null +++ b/.github/workflows/gp-deploy.yaml @@ -0,0 +1,33 @@ +name: Build and Deploy +on: + push: + branches: [main] + workflow_dispatch: + # branches: [ "main", "development" ] +permissions: + contents: write + # pages: write +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v3 + + - uses: pnpm/action-setup@v2 + name: Install pnpm + id: pnpm-install + with: + version: 8.5.0 + run_install: false + + - name: Install dependencies + run: pnpm install + + - run: pnpm build + + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: dist + branch: gh-pages diff --git a/src/TimelineItemIssues.vue b/src/TimelineItemIssues.vue index 8795e4f..fbd2e67 100644 --- a/src/TimelineItemIssues.vue +++ b/src/TimelineItemIssues.vue @@ -50,7 +50,7 @@ function toggle(_tab: string) {
-
+
@@ -137,19 +137,21 @@ a { border-color: var(--rt-c-border); margin-top: 5px;; - >>> a { + :deep(a) { color: var(--rt-c-brand-1); font-weight: 500; text-decoration: none; } - >>> p { + :deep(p) { margin: 1px 0 0 0; - .left & { text-align: right; } } + .desc & :deep(p) { + margin-top: 8px; + } /* } */ } } diff --git a/src/UserBadge.vue b/src/UserBadge.vue index d44e142..25ef971 100644 --- a/src/UserBadge.vue +++ b/src/UserBadge.vue @@ -20,7 +20,7 @@ defineProps<{ display: inline-flex; align-items: center; width: fit-content; - padding: 2px 4px 2px 3px; + padding: 2px 4px 2px 0px; font-weight: 500; font-size: .75rem; line-height: 1rem; diff --git a/vite.config.ts b/vite.config.ts index 00bcae3..4f4e313 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -7,6 +7,7 @@ import postcssNesting from "postcss-nesting"; const name = "index"; export default defineConfig({ + base: "/release-timeline/", plugins: [ vue(), dts({ @@ -18,7 +19,7 @@ export default defineConfig({ lib: { entry: path.resolve(__dirname, "src/index.ts"), name, - fileName: (format) => `${name}.${format}.${format === "es" ? "m" : ""}js`, + fileName: format => `${name}.${format}.${format === "es" ? "m" : ""}js`, }, rollupOptions: { external: ["vue"], @@ -34,7 +35,7 @@ export default defineConfig({ plugins: [postcssNesting], }, }, - define: { - __DEV__: JSON.stringify(!process.env.prod), - }, + // define: { + // __DEV__: JSON.stringify(!process.env.prod), + // }, }); From dbdf8c6e41dfed7eb401d15de9cbcb0f1f8a7e68 Mon Sep 17 00:00:00 2001 From: Ruslan Makarov Date: Wed, 31 Jan 2024 11:14:45 +0300 Subject: [PATCH 2/3] feat: GitHub pages deployment --- .github/workflows/gp-deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gp-deploy.yaml b/.github/workflows/gp-deploy.yaml index 394cabe..03565d1 100644 --- a/.github/workflows/gp-deploy.yaml +++ b/.github/workflows/gp-deploy.yaml @@ -1,7 +1,7 @@ name: Build and Deploy on: push: - branches: [main] + # branches: [main] workflow_dispatch: # branches: [ "main", "development" ] permissions: From c0e12f4b695a795405b99256b3043f5323929093 Mon Sep 17 00:00:00 2001 From: Ruslan Makarov Date: Wed, 31 Jan 2024 11:33:08 +0300 Subject: [PATCH 3/3] fix: add two Vite configs for lib and webapp --- vite.config-lib.ts | 41 +++++++++++++++++++++++++++++++++++++++++ vite.config.ts | 24 ++---------------------- 2 files changed, 43 insertions(+), 22 deletions(-) create mode 100644 vite.config-lib.ts diff --git a/vite.config-lib.ts b/vite.config-lib.ts new file mode 100644 index 0000000..66361b5 --- /dev/null +++ b/vite.config-lib.ts @@ -0,0 +1,41 @@ +import path from "node:path"; +import { defineConfig } from "vite"; +import vue from "@vitejs/plugin-vue"; +import dts from "vite-plugin-dts"; +import postcssNesting from "postcss-nesting"; + +const name = "index"; + +export default defineConfig({ + // base: "/release-timeline/", + plugins: [ + vue(), + // dts({ + // include: "src", + // }), + ], + publicDir: false, + build: { + lib: { + entry: path.resolve(__dirname, "src/index.ts"), + name, + fileName: format => `${name}.${format}.${format === "es" ? "m" : ""}js`, + }, + rollupOptions: { + external: ["vue"], + output: { + globals: { + vue: "Vue", + }, + }, + }, + }, + css: { + postcss: { + plugins: [postcssNesting], + }, + }, + // define: { + // __DEV__: JSON.stringify(!process.env.prod), + // }, +}); diff --git a/vite.config.ts b/vite.config.ts index 4f4e313..2843ca6 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,41 +1,21 @@ -import path from "node:path"; import { defineConfig } from "vite"; import vue from "@vitejs/plugin-vue"; -import dts from "vite-plugin-dts"; import postcssNesting from "postcss-nesting"; -const name = "index"; +// const name = "index"; export default defineConfig({ base: "/release-timeline/", plugins: [ vue(), - dts({ - include: "src", - }), ], // publicDir: false, build: { - lib: { - entry: path.resolve(__dirname, "src/index.ts"), - name, - fileName: format => `${name}.${format}.${format === "es" ? "m" : ""}js`, - }, - rollupOptions: { - external: ["vue"], - output: { - globals: { - vue: "Vue", - }, - }, - }, + target: "esnext", }, css: { postcss: { plugins: [postcssNesting], }, }, - // define: { - // __DEV__: JSON.stringify(!process.env.prod), - // }, });