diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml new file mode 100644 index 000000000..f3e440fce --- /dev/null +++ b/.github/workflows/build-docs.yml @@ -0,0 +1,29 @@ +name: Build Vitepress docs + +on: + pull_request: + +permissions: + contents: read + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - uses: pnpm/action-setup@v2 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + cache: pnpm + node-version: 18 + + - name: Install Packages + run: pnpm install --frozen-lockfile + + - name: Run Build + run: pnpm --filter mermaid run docs:build:vitepress diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index cdd6167b7..bc49ccd9b 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -5,10 +5,6 @@ on: push: branches: - master - pull_request: - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: @@ -53,7 +49,6 @@ jobs: # Deployment job deploy: - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} environment: name: github-pages runs-on: ubuntu-latest