---
title: GitHub Pages deployment
description: Configure GitHub Pages workflow deployment and `pyproject.toml` docs
  metadata for Octavo sites.
order: 10
---
Run `octavo-pages` once in a repository to write `.github/workflows/docs.yml` (when absent), remove legacy Jekyll `_config.yml` and `_layouts/`, enable workflow-based GitHub Pages via the GitHub API, set the repository homepage and `[project.urls].Documentation`, and register `[project.entry-points.nbdev]` for non-nbdev Python packages.

```bash
octavo-pages
octavo-pages --runner macos-latest
```

## fastws\_docs\_install

```python
def fastws_docs_install(
    proj:str, # Package name in `pyproject.toml`
)->str: # Shell install command for `fastws` maturin projects in CI
```

*Return the CI install snippet for a `fastws`-backed maturin project.*

## docs\_workflow

```python
def docs_workflow(
    rust:bool=False, # Include Rust toolchain and sccache settings for maturin/PyO3 projects
    install:str=None, # Optional custom install shell script (`""` skips package installation)
    runner:str='ubuntu-latest', # GitHub Actions runner label (e.g. `"macos-latest"`)
    action:str='AnswerDotAI/workflows/octavo-docs@master', # Composite GitHub Action building and deploying docs
)->str: # Rendered `.github/workflows/docs.yml` YAML text
```

*Build the `.github/workflows/docs.yml` workflow YAML for GitHub Pages deployment.*

```python
wf = docs_workflow()
assert 'pages: write' in wf and 'ubuntu-latest' in wf
```

## octavo\_pages

```python
async def octavo_pages(
    token:str=None, # GitHub token (else `$OCTAVO_TOKEN`, `$FASTSHIP_TOKEN`, `./token`, or `$GITHUB_TOKEN`)
    runner:str='ubuntu-latest', # GitHub Actions runner label (e.g. `"macos-latest"`)
)->str: # Published GitHub Pages URL
```

*Configure GitHub Pages Actions docs deployment and enable Pages on the GitHub repository.*

Creates `.github/workflows/docs.yml` when absent (adding Rust or `fastws` install steps for maturin projects) and removes legacy `_config.yml` and `_layouts/`. Enables GitHub Pages with `build_type="workflow"` (ignoring HTTP 409 if already enabled), sets the repository homepage, fills `[project.urls].Documentation` if unset, and adds `[project.entry-points.nbdev]` (`pkg = "pkg._modidx:d"`) for non-nbdev packages.
