Skip to content

Commit b7aca46

Browse files
authored
fix: api docs (#2352)
1 parent 1f1ee57 commit b7aca46

File tree

5 files changed

+29
-77
lines changed

5 files changed

+29
-77
lines changed

.github/workflows/ci.yml

+28-8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
pull_request:
77
branches: [ main ]
88

9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
914
jobs:
1015
build:
1116
runs-on: ubuntu-latest
@@ -146,14 +151,6 @@ jobs:
146151
token: ${{ secrets.NPM_PUBLISH_AUTOMATION_TOKEN }}
147152
tarball-name: "substrate-smoldot-discovery"
148153
package-directory: ./packages/smoldot-discovery
149-
- name: Fetch gh-pages
150-
if: steps.publish_connect.outputs.type || steps.publish_connect_extension_protocol.outputs.type
151-
run: |
152-
git remote set-branches origin gh-pages
153-
git fetch --depth 1 origin gh-pages
154-
- name: Deploy Projects & Docs
155-
if: steps.publish_connect.outputs.type || steps.publish_connect_extension_protocol.outputs.type
156-
run: pnpm deploy-projects-and-docs
157154

158155
upload-extension-artifacts:
159156
if: github.ref == 'refs/heads/main'
@@ -177,6 +174,29 @@ jobs:
177174
name: substrate-connect-extension-mv3-chrome
178175
path: ./projects/extension/dist
179176

177+
docs:
178+
if: github.ref == 'refs/heads/main'
179+
needs: [build]
180+
runs-on: ubuntu-latest
181+
steps:
182+
- uses: actions/checkout@v4.1.7
183+
- uses: ./.github/actions/turbo-build
184+
- name: Generate API Docs
185+
run: pnpm api-docs
186+
187+
- name: Setup Pages
188+
uses: actions/configure-pages@v3
189+
190+
- name: Upload artifact
191+
uses: actions/upload-pages-artifact@v2
192+
with:
193+
# Upload entire repository
194+
path: './docs'
195+
196+
- name: Deploy to GitHub Pages
197+
id: deployment
198+
uses: actions/deploy-pages@v2
199+
180200
all:
181201
# This dummy job depends on all the mandatory checks. It succeeds if and only if all CI checks
182202
# are successful.

.github/workflows/deploy-projects-and-docs.yml

-19
This file was deleted.

deploy.sh

-48
This file was deleted.

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"dev:burnr": "pnpm --filter @substrate/burnr dev",
2727
"dev:demo": "pnpm --filter @substrate/demo dev",
2828
"dev:extension": "pnpm --filter @substrate/extension dev",
29-
"deploy-projects-and-docs": "./deploy.sh",
3029
"format": "prettier --write .",
3130
"prepare": "husky"
3231
},

typedoc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Substrate Connect",
33
"entryPoints": ["packages/*"],
44
"entryPointStrategy": "packages",
5-
"out": "_site/api",
5+
"out": "docs",
66
"theme": "default",
77
"exclude": ["**/*.test.ts"],
88
"excludeExternals": false,

0 commit comments

Comments
 (0)