diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f2d2717..d43c6eb 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -6,6 +6,10 @@ on: paths: - 'docs/**' - 'mkdocs.yml' + - 'sourcey.config.ts' + - 'go.mod' + - 'go.sum' + - '**/*.go' workflow_dispatch: permissions: @@ -27,12 +31,22 @@ jobs: with: python-version: '3.12' + - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 + with: + node-version: '24' + - name: Install dependencies run: pip install -r requirements-docs.txt - name: Build docs run: mkdocs build --strict + - name: Build Sourcey reference + run: | + npx --yes sourcey@3.6.5 build --output site/reference + mkdir -p site/reference/api + cp site/reference/api.html site/reference/api/index.html + - name: Upload artifact uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 with: diff --git a/mkdocs.yml b/mkdocs.yml index 9d1f853..32d6516 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -44,6 +44,7 @@ nav: - CLI Reference: cli.md - Go Library: library.md - API Reference: api.md + - Sourcey Reference: https://txeh.txn2.com/reference/ - Troubleshooting: troubleshooting.md extra: diff --git a/sourcey.config.ts b/sourcey.config.ts new file mode 100644 index 0000000..45610e6 --- /dev/null +++ b/sourcey.config.ts @@ -0,0 +1,25 @@ +export default { + name: "txeh Reference", + siteUrl: "https://txeh.txn2.com", + baseUrl: "/reference", + repo: "https://github.com/txn2/txeh", + editBranch: "master", + navigation: { + tabs: [ + { + tab: "Guides", + slug: "", + mkdocs: "./mkdocs.yml", + }, + { + tab: "Go API", + slug: "api", + godoc: { + module: ".", + packages: ["./..."], + mode: "live", + }, + }, + ], + }, +};