Release 1.191.0 #2859
This file contains 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: [master, nightly] | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@main | |
with: | |
tool-cache: true | |
android: false | |
dotnet: false | |
haskell: false | |
large-packages: true | |
docker-images: true | |
swap-storage: true | |
- name: Install runner dependencies | |
run: sudo apt-get install -y curl clang git libssl-dev make pkg-config | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Get Rust version from rust-toolchain.toml | |
id: rust-version | |
run: | | |
version=$(awk -F\" '/version/ {print $2}' nautilus_core/rust-toolchain.toml) | |
echo "Rust toolchain version $version" | |
echo "RUST_VERSION=$version" >> $GITHUB_ENV | |
working-directory: ${{ github.workspace }} | |
- name: Set up Rust tool-chain (Linux, Windows) stable | |
if: (runner.os == 'Linux') || (runner.os == 'Windows') | |
uses: actions-rust-lang/[email protected] | |
with: | |
toolchain: ${{ env.RUST_VERSION }} | |
components: rustfmt, clippy | |
- name: Set up Rust tool-chain (nightly) | |
uses: actions-rust-lang/[email protected] | |
with: | |
toolchain: nightly | |
components: rustfmt, clippy | |
- name: Set up Python environment | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Get Poetry version from poetry-version | |
run: | | |
version=$(cat poetry-version) | |
echo "POETRY_VERSION=$version" >> $GITHUB_ENV | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: ${{ env.POETRY_VERSION }} | |
- name: Install build dependencies | |
run: python -m pip install --upgrade pip setuptools wheel pre-commit msgspec | |
- name: Build project | |
run: poetry install --with docs --all-extras | |
- name: Get branch name | |
id: branch-name | |
uses: tj-actions/[email protected] | |
- name: Build Python docs | |
run: make docs-python | |
- name: Build Rust docs | |
run: | | |
make docs-rust | |
cp -r nautilus_core/target/doc docs/build/html/core | |
- name: Add nojeckyll | |
run: touch docs/build/html/.nojekyll | |
- name: Add CNAME | |
run: echo "docs.nautilustrader.io" >> docs/build/html/CNAME | |
- name: Publish docs (nightly) | |
if: ${{ steps.branch-name.outputs.current_branch == 'nightly' }} | |
uses: s0/git-publish-subdir-action@develop | |
env: | |
REPO: self | |
BRANCH: gh-pages | |
FOLDER: docs/build/html | |
SQUASH_HISTORY: false | |
GITHUB_TOKEN: ${{ secrets.GHPAGES_ACCESS }} | |
TARGET_DIR: nightly | |
- name: Publish docs (latest) | |
if: ${{ steps.branch-name.outputs.current_branch == 'master' }} | |
uses: s0/git-publish-subdir-action@develop | |
env: | |
REPO: self | |
BRANCH: gh-pages | |
FOLDER: docs/build/html | |
SQUASH_HISTORY: false | |
GITHUB_TOKEN: ${{ secrets.GHPAGES_ACCESS }} |