Update Rust/TS bindings (#3608) #2290
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 Rust Docs | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| # Cancel any previous job still running this workflow for this branch | |
| # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs#example-using-concurrency-to-cancel-any-in-progress-job-or-run | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| deploy-docs: | |
| name: Deploy docs | |
| runs-on: bare-metal | |
| permissions: | |
| contents: write | |
| steps: | |
| # The protobuf compiler should be pre-installed on bare-metal | |
| #- name: Install tooling | |
| # run: sudo apt-get install -y protobuf-compiler | |
| - name: Check tooling | |
| run: protoc --version | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| # With rustup's nice new toml format, we just need to run rustup show to install the toolchain | |
| # https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659 | |
| - name: Setup Rust toolchain | |
| run: | | |
| rustup override unset | |
| rustup show | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-doc-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Build rustdocs | |
| uses: actions-rs/cargo@v1 | |
| env: | |
| CARGO_INCREMENTAL: "0" | |
| with: | |
| command: doc | |
| args: --all --no-deps | |
| # Make an index.html file so we start at the moonbeam_runtime page | |
| # Copied from https://github.com/substrate-developer-hub/rustdocs/blob/master/index.html | |
| - name: Make index.html | |
| run: echo "<meta http-equiv=refresh content=0;url=moonbeam_runtime/index.html>" > ./target/doc/index.html | |
| - name: Deploy documentation | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages | |
| publish_dir: ./target/doc |