From 9e3c5213230785c4718902f63b0069a9d07759ad Mon Sep 17 00:00:00 2001 From: Michael Beckemeyer Date: Thu, 22 Aug 2024 16:30:08 +0200 Subject: [PATCH] Configure gh-pages --- .github/workflows/build.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 57f2556..bd357bb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,6 +13,7 @@ on: jobs: build: runs-on: ubuntu-latest + timeout-minutes: 5 permissions: contents: write steps: @@ -43,6 +44,10 @@ jobs: pnpm build pnpm test + - name: Bulid documentation + run: | + pnpm build-docs + - name: Determine release tag if: ${{ inputs.release && github.ref == 'refs/heads/main' }} run: | @@ -66,3 +71,35 @@ jobs: run: | cd packages/reactivity-core pnpm publish + + - name: Upload documentation artifact + uses: actions/upload-artifact@v4 + with: + name: docs + path: dist/docs + retention-days: 1 + + deploy: + if: github.ref == 'refs/heads/main' + concurrency: deploy-${{ github.ref }} + runs-on: ubuntu-latest + timeout-minutes: 5 + needs: build + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Load documentation artifact + uses: actions/download-artifact@v4 + with: + name: docs + path: docs + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: docs + branch: gh-pages + target-folder: docs