diff --git a/.github/workflows/auto-build-doc-dev.yml b/.github/workflows/auto-build-doc-dev.yml new file mode 100644 index 000000000..697aa0204 --- /dev/null +++ b/.github/workflows/auto-build-doc-dev.yml @@ -0,0 +1,48 @@ +name: Docker Build Doc Check + +concurrency: + group: docker-build-doc-dev-${{ github.ref }} + cancel-in-progress: true + +on: + workflow_dispatch: + pull_request: + branches: [develop] + paths: + - 'doc/**' + - '.github/workflows/**' + push: + branches: [develop] + paths: + - 'doc/**' + - '.github/workflows/**' + +jobs: + build-docs-check: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + + - name: Install dependencies + run: | + cd doc + npm install + + - name: Build doc + run: | + cd doc + npm run docs:build + BUILD_EXIT_CODE=$? + + if [ $BUILD_EXIT_CODE -ne 0 ]; then + echo "❌ Doc build failed with exit code $BUILD_EXIT_CODE" + exit $BUILD_EXIT_CODE + else + echo "✅ Doc build completed successfully" + fi \ No newline at end of file