From 31cb59503fa01f3083d34ee143c44524907235ff Mon Sep 17 00:00:00 2001 From: rami3l Date: Fri, 17 Jan 2025 13:55:51 +0800 Subject: [PATCH] ci(deploy-docs): build one book per workflow step --- .github/workflows/deploy-docs.yaml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-docs.yaml b/.github/workflows/deploy-docs.yaml index 32b7d466..2719b1e2 100644 --- a/.github/workflows/deploy-docs.yaml +++ b/.github/workflows/deploy-docs.yaml @@ -24,22 +24,28 @@ jobs: uses: taiki-e/install-action@v2 with: tool: mdbook - - name: Build book + - name: Prepare directories + run: | + mkdir -p ${{ runner.temp }}/book + mkdir -p ${{ runner.temp }}/book/devel + mkdir -p ${{ runner.temp }}/book/dev-guide + - name: Build user-guide (stable) run: | - # Build for stable git checkout stable # Support both old and new directory structure during the transition cd doc/user-guide || cd doc mdbook build mv book ${{ runner.temp }} - # Build for master - cd $(git rev-parse --show-toplevel) + - name: Build user-guide (master) + run: | git checkout master cd doc/user-guide mdbook build mv book ${{ runner.temp }}/book/devel - # Build dev-guide for master - cd ../dev-guide + - name: Build dev-guide (master) + run: | + git checkout master + cd doc/dev-guide mdbook build mv book ${{ runner.temp }}/book/dev-guide - name: Deploy to GitHub