refactor(driver): require Default for Control (#859) #154
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: Deploy Documentation | |
| on: | |
| push: | |
| branches: | |
| - ci/deploy-docs | |
| - master | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| build-docs: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| artifact-name: docs-linux | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| artifact-name: docs-windows | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| artifact-name: docs-darwin | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Rust Toolchain | |
| run: | | |
| rustup toolchain install nightly | |
| rustup default nightly | |
| rustup target add ${{ matrix.target }} | |
| - name: Build Documentation for ${{ matrix.target }} | |
| shell: bash | |
| run: | | |
| GIT_SHA=$(git rev-parse --short HEAD) | |
| export RUSTDOCFLAGS="-Zunstable-options --enable-index-page --cfg docsrs --crate-version $GIT_SHA" | |
| cargo doc --workspace --no-deps --all-features --target ${{ matrix.target }} | |
| - name: Prepare documentation artifact | |
| shell: bash | |
| run: | | |
| mkdir -p docs-output/${{ matrix.target }} | |
| cp -r target/${{ matrix.target }}/doc/* docs-output/${{ matrix.target }}/ | |
| - name: Upload documentation artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact-name }} | |
| path: docs-output/${{ matrix.target }} | |
| retention-days: 1 | |
| deploy: | |
| needs: build-docs | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| deployments: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Download Linux docs | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: docs-linux | |
| path: public/x86_64-unknown-linux-gnu | |
| - name: Download Windows docs | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: docs-windows | |
| path: public/x86_64-pc-windows-msvc | |
| - name: Download Darwin docs | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: docs-darwin | |
| path: public/aarch64-apple-darwin | |
| - name: Copy index page | |
| run: | | |
| cp docs/index.html public/index.html | |
| - name: Deploy to Cloudflare Pages | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CF_API_TOKEN }} | |
| accountId: ${{ secrets.CF_ACCOUNT_ID }} | |
| command: deploy --assets public --name compio-docs --compatibility-date 2026-01-23 |