feat(sources): Open Connector source packs and scan engine (#162) #97
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: Docs | |
| on: | |
| push: | |
| branches: [main] | |
| # Allow manual trigger from the Actions tab | |
| workflow_dispatch: | |
| # Only one docs deployment at a time | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| # Treat rustdoc warnings as errors so broken links are caught in CI | |
| RUSTDOCFLAGS: "--cfg docsrs -D warnings" | |
| jobs: | |
| build: | |
| name: Build docs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-docs-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-docs- | |
| - name: Install protoc | |
| run: sudo apt-get install -y protobuf-compiler | |
| - name: Build documentation | |
| # --no-deps keeps the output focused on skardi's own APIs. | |
| # sources is excluded from the facade crate until the lance git dep is resolved. | |
| run: cargo doc --no-deps -p skardi | |
| - name: Add redirect from root to skardi | |
| run: | | |
| echo '<meta http-equiv="refresh" content="0; url=skardi/index.html">' \ | |
| > target/doc/index.html | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: target/doc | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |