Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Typedoc for Wasm API docs #1399

Merged
merged 26 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d90e93a
Migrate to typedoc
Dr-Electron Aug 24, 2024
6409ccc
extend config
eike-hass Aug 27, 2024
16be667
extend config
eike-hass Aug 27, 2024
db1fb1c
Merge branch 'typedoc' of github.com:iotaledger/identity.rs into typedoc
eike-hass Aug 27, 2024
d71ca91
rework docs build
eike-hass Aug 28, 2024
268317b
use typedoc for docs
eike-hass Aug 28, 2024
5cbf0ba
Merge branch 'main' into typedoc
eike-hass Aug 28, 2024
1e72b0e
Merge branch 'main' into typedoc
eike-hass Aug 30, 2024
e7e9dd2
Update config
Dr-Electron Aug 30, 2024
3b3ae9c
Downgrade typedoc and add flags from IOTA SDK to make it work
Dr-Electron Sep 2, 2024
da3bbb2
Remove useless(?) backticks
Dr-Electron Sep 2, 2024
4392045
Fix docs with fix_docs script ;)
Dr-Electron Sep 2, 2024
a9dc169
Change output path
Dr-Electron Sep 3, 2024
c31d9fb
Add docs to artifacts
Dr-Electron Sep 3, 2024
bf5678b
Add upload action
Dr-Electron Sep 3, 2024
022a6ea
Remove unused docs script
Dr-Electron Sep 3, 2024
42b4c4b
Move content into wasm folder
Dr-Electron Sep 3, 2024
ce18ed8
I can't decide
Dr-Electron Sep 3, 2024
e21ccce
Unify setup with SDK and EVM docs
Dr-Electron Sep 3, 2024
53fc53d
Update bindings/wasm/typedoc.json
Dr-Electron Sep 3, 2024
b857787
Merge branch 'main' into typedoc
eike-hass Sep 6, 2024
bea4425
Merge branch 'typedoc' of github.com:iotaledger/identity.rs into typedoc
eike-hass Sep 6, 2024
21ce4eb
Update artifacts action to v4
Dr-Electron Sep 6, 2024
2f24b18
Use PR branch for static action
Dr-Electron Sep 6, 2024
83bef46
Remove token
Dr-Electron Sep 6, 2024
186db50
Revert branch change
Dr-Electron Sep 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/publish/publish-wasm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ runs:
registry-url: 'https://registry.npmjs.org'

- name: Download bindings/wasm artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: ${{ inputs.input-artifact-name }}
path: bindings/wasm
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ jobs:
working-directory: bindings/wasm

- name: Download bindings/wasm artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: identity-wasm-bindings-build
path: bindings/wasm
Expand Down Expand Up @@ -238,7 +238,7 @@ jobs:
working-directory: bindings/wasm

- name: Download bindings/wasm artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: identity-wasm-bindings-build
path: bindings/wasm
Expand Down Expand Up @@ -286,7 +286,7 @@ jobs:
working-directory: bindings/wasm

- name: Download bindings/wasm artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: identity-wasm-bindings-build
path: bindings/wasm
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/shared-build-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,13 @@ jobs:
os: ${{matrix.os}}

- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.output-artifact-name }}
path: |
bindings/wasm/node
bindings/wasm/web
bindings/wasm/examples/dist
Dr-Electron marked this conversation as resolved.
Show resolved Hide resolved
bindings/wasm/docs
if-no-files-found: error
retention-days: 1
51 changes: 51 additions & 0 deletions .github/workflows/upload-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build and upload API docs

on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: 'Version to publish docs under (e.g. `v1.2.3-dev.1`)'
required: true

permissions:
actions: 'write'

jobs:
build-wasm:
# owner/repository of workflow has to be static, see https://github.community/t/env-variables-in-uses/17466
uses: iotaledger/identity.rs/.github/workflows/shared-build-wasm.yml@main
with:
run-unit-tests: false
ref: ${{ inputs.ref }}
output-artifact-name: identity-docs

upload-docs:
runs-on: ubuntu-latest
needs: build-wasm
steps:
- uses: actions/download-artifact@v4
with:
name: identity-docs
- name: Get release version
id: get_release_version
run: |
if [ "${{ github.event_name }}" = "release" ]; then
INPUT_VERSION="${{ github.ref }}"
else
INPUT_VERSION="${{ github.event.inputs.version }}"
fi
VERSION=$(echo $INPUT_VERSION | sed -e 's/.*v\([0-9]*\.[0-9]*\).*/\1/')
echo VERSION=$VERSION >> $GITHUB_OUTPUT
- name: Compress generated docs
run: |
tar czvf wasm.tar.gz docs/*

- name: Upload docs to AWS S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_IOTA_WIKI }}
Dr-Electron marked this conversation as resolved.
Show resolved Hide resolved
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_IOTA_WIKI }}
AWS_DEFAULT_REGION: "eu-central-1"
run: |
aws s3 cp wasm.tar.gz s3://files.iota.org/iota-wiki/iota-identity/${{ steps.get_release_version.outputs.VERSION }}/ --acl public-read
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ index.html
*.hodl.*

!/bindings/wasm/static/index.html

docs
15 changes: 0 additions & 15 deletions bindings/wasm/build/docs.js

This file was deleted.

Loading
Loading