Skip to content

Fix TickScheme imports and registration #2632

Fix TickScheme imports and registration

Fix TickScheme imports and registration #2632

Workflow file for this run

name: docs
# Build and deploy the NautilusTrader documentation
on:
push:
branches: [master, develop]
jobs:
docs:
runs-on: ubuntu-latest
steps:
- 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@v4
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/branch-names@v6
- 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 (develop)
if: ${{ steps.branch-name.outputs.current_branch == 'develop' }}
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: develop
- 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 }}