Skip to content

Commit

Permalink
docs: upload soroban docs to gh pages
Browse files Browse the repository at this point in the history
  • Loading branch information
milapsheth committed Dec 8, 2024
1 parent e06032c commit c798012
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/upload-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Upload Docs

on:
push:
branches:
- main
- docs/gh-pages

permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.81.0

- name: Setup cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

- name: Build Documentation
run: |
# Build docs for all workspace members
cargo doc --no-deps --workspace
# Create an index.html that redirects to the main crate's docs
echo '<meta http-equiv="refresh" content="0; url=axelar_gateway/index.html">' > target/doc/index.html
# Copy the generated docs to the pages directory
mkdir -p pages
cp -r target/doc/* pages/
- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: pages

deploy:
needs: build

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This repo implements Axelar's [cross-chain gateway protocol](https://github.com/

> Check configuration for CLI and Identity before deployment: https://developers.stellar.org/docs/build/smart-contracts/getting-started/setup
## Docs

Rustdocs for this workspace can be found [here](https://axelarnetwork.github.io/axelar-cgp-soroban).

## Install

Install Soroban CLI
Expand Down

0 comments on commit c798012

Please sign in to comment.