From 168972ade17d6a0623cf2a5e4345d1e5eb32920a Mon Sep 17 00:00:00 2001 From: nekosu Date: Thu, 3 Aug 2023 01:55:23 +0800 Subject: [PATCH] feat: test ci --- .github/deploy.yml | 41 +++++++++++++++++++++++++++++++++++++++++ vite.config.ts | 3 ++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 .github/deploy.yml diff --git a/.github/deploy.yml b/.github/deploy.yml new file mode 100644 index 0000000..5c2896b --- /dev/null +++ b/.github/deploy.yml @@ -0,0 +1,41 @@ +name: Deploy GitHub Pages + +on: + push: + branches: + - main # Set a branch name to trigger deployment + pull_request: + +jobs: + deploy: + runs-on: ubuntu-22.04 + permissions: + contents: write + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v3 + with: + submodules: true # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + + - name: Use Node.js 18 + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Setup node_modules + run: npm ci + + - name: Build + run: npm run build + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + # If you're changing the branch from main, + # also change the `main` in `refs/heads/main` + # below accordingly. + if: github.ref == 'refs/heads/main' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist diff --git a/vite.config.ts b/vite.config.ts index 56be804..6cd55fc 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -18,5 +18,6 @@ export default defineConfig({ alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) } - } + }, + base: '/maa-pipeline-viewer' })