From 2ce0a730a4ad7c639da3157bdc7f01765e80e266 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Mon, 21 Sep 2026 05:39:20 +0300 Subject: [PATCH] Improvements in the docs building Build the book after downloading additional files, so additional md files can be passed through the builder. Add more tests for docs artifact. Publish current git commit on the docs. Minor simplifications. --- .github/workflows/docs.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4e3178d..020df31 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -33,8 +33,6 @@ jobs: - uses: actions/checkout@v7 - name: Install mdBook run: cargo install mdbook --vers 0.4.43 --locked - - name: Build book - run: cd docs && mdbook build - name: Download additional files if: ${{ env.QUADCOPTER_DEV_TOKEN && env.FULL }} uses: actions/checkout@v7 @@ -46,7 +44,9 @@ jobs: fetch-depth: 1 - name: Add additional files if: ${{ env.QUADCOPTER_DEV_TOKEN && env.FULL }} - run: cp -a quadcopter.dev/. docs/build/ + run: rsync -a --keep-dirlinks quadcopter.dev/. docs/book/ + - name: Build book + run: cd docs && mdbook build - name: Wait for Build to complete if: ${{ env.FULL }} uses: matiasalbarello/wait-on-check-action-ts@v1.2.0 @@ -59,7 +59,7 @@ jobs: if: ${{ env.FULL }} id: build_run run: | - RUN_ID=$(gh api "repos/${{ github.repository }}/actions/workflows/build.yml/runs?head_sha=${{ github.sha }}&per_page=1" --jq '.workflow_runs[0].id') + RUN_ID=$(gh api "repos/${{ github.repository }}/actions/workflows/build.yml/runs?head_sha=${{ github.sha }}" --jq '.workflow_runs[0].id') echo "id=$RUN_ID" >> $GITHUB_OUTPUT env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -83,11 +83,15 @@ jobs: ln -s "$FQBN/flix.ino.bin" "flix.$BOARD.bin" ln -s "$FQBN/flix.ino.bootloader.bin" "flix.$BOARD.bootloader.bin" done + - name: Put version file + run: echo "${{ github.sha }}" > docs/build/version.txt - name: Test build artifacts working-directory: docs/build run: | - ls; ls index.html gyro.html geometry.html firmware.html flix.esp32.merged.bin flix.esp32c3.merged.bin \ - flix.esp32s3.merged.bin flix.esp32s3.opi.merged.bin flix.esp32s3.qspi.merged.bin flix.flix2.merged.bin + tree -a -I .git + ls index.html gyro.html geometry.html firmware.html flix.esp32.merged.bin flix.esp32c3.merged.bin \ + flix.esp32s3.merged.bin flix.esp32s3.opi.merged.bin flix.esp32s3.qspi.merged.bin flix.flix2.merged.bin \ + meta/general.json meta/parameters.json version.txt - name: Upload artifact uses: actions/upload-pages-artifact@v5 with: