diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 927df09b..d71814c2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,6 +3,9 @@ on: push: branches: - master + pull_request: + branches: + - main jobs: build: runs-on: ubuntu-latest @@ -27,6 +30,8 @@ jobs: run: | npm i -g yarn export DEPLOY=true + export BETA=true + echo "$GITHUB_EVENT_NAME" rm -rf docs/_app yarn install # yarn run lint diff --git a/svelte.config.js b/svelte.config.js index d0b5acbc..64da24ed 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -13,11 +13,11 @@ const config = { kit: { adapter: adapter({ - pages: 'docs' + pages: `docs${process.env['BETA'] ? '/beta' : ''}` }), paths: process.env['DEPLOY'] ? { - base: '/mermaid-live-editor' + base: `${process.env['BETA'] ? '/beta' : ''}/mermaid-live-editor` } : {}, ssr: false,