Fix netlify docs (#1077)

This commit is contained in:
Brandon Thomas
2026-03-02 07:11:17 -05:00
committed by GitHub
parent 748fd316c1
commit 3654676a13
4 changed files with 37 additions and 5 deletions
@@ -25,16 +25,17 @@ use utoipa::OpenApi;
use docs::api_doc::ApiDoc;
use errors::AnyhowResult;
pub mod billing;
pub mod configs;
pub mod docs;
pub mod email;
pub mod error;
pub mod http_server;
pub mod state;
pub mod threads;
pub mod util;
pub mod docs;
#[actix_web::main]
async fn main() -> AnyhowResult<()> {
let api_json = ApiDoc::openapi().to_pretty_json()?;
@@ -30,15 +30,14 @@ use crate::configs::static_api_tokens::StaticApiTokenSet;
pub mod billing;
pub mod configs;
pub mod docs;
pub mod email;
pub mod error;
pub mod http_server;
pub mod state;
pub mod threads;
pub mod util;
pub mod docs;
mod email;
#[actix_web::main]
async fn main() -> Result<(), impl Error> {
HttpServer::new(move || {
+32
View File
@@ -0,0 +1,32 @@
#!/bin/bash
#
set -euxo pipefail
# Resolve the repo root regardless of where this script is invoked from
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
cd "$REPO_ROOT"
# boring-sys2 uses bindgen (libclang) to generate Rust FFI bindings for BoringSSL.
# On Netlify's build image, clang is available but can't locate stddef.h on its
# own because the GCC system header path isn't in its default search path.
# Pointing bindgen at GCC's own include directory resolves this without any
# package installation.
export BINDGEN_EXTRA_CLANG_ARGS="-I$(gcc -print-file-name=include)"
# Install Rust toolchain
rustup update
rustup default stable
# Emit versions
rustup show
mkdir -p ./build
SQLX_OFFLINE=true cargo run --bin docs-cli
mv api.json ./build
cp ./frontend/api_docs.html ./build/index.html