feat: detect, analyze featured workflows and generate documents #12
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: generate-docs | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| generate: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout clore | |
| uses: actions/checkout@v6 | |
| - name: Setup pixi | |
| uses: prefix-dev/setup-pixi@v0.9.5 | |
| with: | |
| pixi-version: v0.67.0 | |
| activate-environment: true | |
| cache: false | |
| locked: true | |
| - name: Restore .clice cache | |
| id: restore-clice-cache | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: .clice/ | |
| key: ${{ runner.os }}-clice | |
| - name: Restore build directory cache | |
| id: restore-build-cache | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: build/Debug/ | |
| key: ${{ runner.os }}-${{ hashFiles('pixi.lock', 'pixi.toml', '**/CMakeLists.txt', 'cmake/**/*.cmake') }} | |
| - name: Configure | |
| run: pixi run cmake-config Debug | |
| - name: Build | |
| run: pixi run cmake-build Debug | |
| - name: Save .clice cache | |
| if: steps.restore-clice-cache.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v5 | |
| with: | |
| path: .clice/ | |
| key: ${{ steps.restore-clice-cache.outputs.cache-primary-key }} | |
| - name: Save build directory cache | |
| if: steps.restore-build-cache.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v5 | |
| with: | |
| path: build/Debug/ | |
| key: ${{ steps.restore-build-cache.outputs.cache-primary-key }} | |
| - name: Generate documentation | |
| if: github.event_name == 'push' | |
| env: | |
| OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }} | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| run: | | |
| ./build/Debug/bin/clore \ | |
| --compile-commands build/Debug/compile_commands.json \ | |
| --source-dir src \ | |
| --output-dir generated \ | |
| --log-level info \ | |
| --model deepseek-chat | |
| - name: Package documentation | |
| run: zip -r clore-docs.zip generated | |
| - name: Upload documentation artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: clore-docs | |
| path: clore-docs.zip | |
| retention-days: 30 |