From d9f771888d515e4133fdbd518399a729b254e8d1 Mon Sep 17 00:00:00 2001 From: Asteri5m <73411291+Asteri5m@users.noreply.github.com> Date: Wed, 19 Jun 2024 00:31:26 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8DHalo=20page=EF=BC=9A/tools/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 26 ++++++++++++++++++++++++++ vite.config.ts | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 00000000..aa1a4215 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,26 @@ +name: Deploy to Halo + +on: + push: + branches: [main] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + with: + version: 8 + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'pnpm' + - name: Install dependencies + run: pnpm install + - name: Build + run: pnpm build + - name: Deploy to Halo + run: | + npx halo-static-pages-deploy-cli deploy -e ${{ secrets.ENDPOINT }} -i ${{ secrets.ID }} -t ${{ secrets.PAT }} -f dist \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 42a2cb29..1e2a1037 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -16,7 +16,7 @@ import markdown from 'vite-plugin-vue-markdown'; import svgLoader from 'vite-svg-loader'; import { configDefaults } from 'vitest/config'; -const baseUrl = process.env.BASE_URL ?? '/'; +const baseUrl = process.env.BASE_URL ?? '/tools'; // https://vitejs.dev/config/ export default defineConfig({