Merge pull request #2281 from opentensor/alpha_injection_cap #1
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: Publish rustdocs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| concurrency: | |
| group: rustdocs-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: [self-hosted, type-ccx13] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Install dependencies | |
| run: | | |
| sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get update | |
| sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get install -y --no-install-recommends -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" build-essential clang curl libssl-dev llvm libudev-dev protobuf-compiler pkg-config | |
| - name: Install rustup | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| - name: Generate documentation | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: doc | |
| args: --document-private-items | |
| - name: Fix file permissions | |
| shell: sh | |
| run: | | |
| chmod -c -R +rX "target/doc" | | |
| while read line; do | |
| echo "::warning title=Invalid file permissions automatically fixed::$line" | |
| done | |
| - name: Generate index.html file | |
| run: | | |
| echo "<meta http-equiv=refresh content=0;url=wasm_oidc_plugin/index.html>" > target/doc/index.html | |
| - name: Upload documentation | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./target/doc | |
| deploy: | |
| needs: build | |
| runs-on: [self-hosted, type-ccx13] | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.pages.outputs.page_url }} | |
| steps: | |
| - name: Deploy documentation | |
| id: pages | |
| uses: actions/deploy-pages@v2 |