diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 118e3ee..7d98fd4 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -4,22 +4,24 @@ on: push: branches: - main # Set a branch name to trigger deployment - - + paths: + - '.github/workflows/gh-pages.yml' + - 'website/**' + pull_request: jobs: deploy: runs-on: ubuntu-latest permissions: contents: write + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} defaults: run: working-directory: website strategy: matrix: node-version: [20.x] - concurrency: - group: ${{ github.workflow }}-${{ github.ref }} steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} diff --git a/website/tests/website.spec.ts b/website/tests/website.spec.ts new file mode 100644 index 0000000..4ccf8f8 --- /dev/null +++ b/website/tests/website.spec.ts @@ -0,0 +1,5 @@ +describe('should test the website file', () => { + it('should test the website file', () => { + expect(1).toBe(1); + }); +}); diff --git a/website/vitest.config.mts b/website/vitest.config.mts new file mode 100644 index 0000000..6e2403d --- /dev/null +++ b/website/vitest.config.mts @@ -0,0 +1,14 @@ +import { fileURLToPath } from 'url'; +import { configDefaults, defineConfig } from 'vitest/config'; + +export default defineConfig({ + test: { + globals: true, + testTimeout: 100000000, + exclude: [...configDefaults.exclude], + alias: { + '~/': fileURLToPath(new URL('./src/', import.meta.url)), + }, + include: ['**/?(*.){test,spec}.?(c|m)[jt]s?(x)'], + }, +});