docs: add link to API Reference (typedoc) (#790)

* chore: shorten `docs` scripts

`githubPages` is true by default
https://rb.gy/hzopfn

* docs: update README.md

* chore: trigger docs workflow only on changes in relevant files

* refactor: provide `cname` typedoc option via config file

* chore: remove heyauthn from exclude typedoc list
This commit is contained in:
sripwoud
2024-05-30 17:29:56 +02:00
committed by GitHub
parent 55e887c111
commit 4870175577
4 changed files with 23 additions and 12 deletions

View File

@@ -2,13 +2,19 @@ name: docs
on:
push:
branches:
- main
branches: [main]
paths:
[
"apps/docs/**",
"packages/data/**",
"packages/group/**",
"packages/identity/**",
"packages/proof/**",
"packages/utils/**"
]
jobs:
gh-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

View File

@@ -1,9 +1,9 @@
<p align="center">
<h1 align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/semaphore-protocol/.github/blob/main/assets/semaphore-logo-light.svg">
<source media="(prefers-color-scheme: light)" srcset="https://github.com/semaphore-protocol/.github/blob/main/assets/semaphore-logo-dark.svg">
<img width="250" alt="Semaphore icon" src="https://github.com/semaphore-protocol/.github/blob/main/assets/semaphore-logo-dark.svg">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/semaphore-protocol/.github/main/assets/semaphore-logo-light.svg">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/semaphore-protocol/.github/main/assets/semaphore-logo-dark.svg">
<img width="250" alt="Semaphore icon" src="https://raw.githubusercontent.com/semaphore-protocol/.github/main/assets/semaphore-logo-dark.svg">
</picture>
</h1>
</p>
@@ -56,6 +56,10 @@
<a href="https://semaphore.pse.dev/discord">
🗣️ Chat &amp; Support
</a>
<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
<a href="https://js.semaphore.pse.dev">
💻 API Reference
</a>
</h4>
</div>

View File

@@ -20,7 +20,7 @@
"lint": "eslint . --ext .js,.ts,.tsx && yarn workspace semaphore-contracts lint",
"format": "prettier -c . && yarn workspace semaphore-docs format",
"format:write": "prettier -w . && yarn workspace semaphore-docs format:write",
"docs": "typedoc --cname js.semaphore.pse.dev --githubPages true",
"docs": "typedoc",
"version:bump": "yarn workspaces foreach -A --no-private version -d ${0} && yarn version apply --all && yarn remove:stable-version-field && NO_HOOK=1 git commit -am \"chore: v${0}\" && git tag v${0}",
"version:publish": "yarn build:libraries && yarn clean:cli-templates && yarn workspaces foreach -A --no-private npm publish --tolerate-republish --access public",
"version:release": "changelogithub",

View File

@@ -2,15 +2,15 @@ const fs = require("fs")
const path = require("path")
const EXCLUDE_PKGS = [
"circuits",
"cli",
"cli-template",
"cli-template-contracts-hardhat",
"cli-template-monorepo-ethers",
"cli-template-monorepo-subgraph",
"core",
"circuits",
"contracts",
"hardhat",
"cli"
"core",
"hardhat"
]
const packagesDir = path.join(__dirname, "packages")
const entryPoints = fs
@@ -20,6 +20,7 @@ const entryPoints = fs
/** @type {import('typedoc').typedocoptions} */
module.exports = {
cname: "js.semaphore.pse.dev",
entryPoints,
name: "Semaphore SDK",
entryPointStrategy: "packages"