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

Docs #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Docs #15

Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 36 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy Docusaurus site to GitHub Pages

on:
push:
branches:
- main # or the branch you want to deploy from

jobs:
build-deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: true

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x' # Ensure this matches your project's Node.js version

- name: Install dependencies
run: npm install

- name: Build Docusaurus site
run: npm run build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build
9 changes: 5 additions & 4 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Delete demo/pkg symlink
run: rm -fr demo/pkg
# - name: Delete demos/vanilla-js/pkg symlink
# run: rm -fr demos/vanilla-js/pkg

- name: Setup Rust Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
Expand All @@ -36,14 +36,15 @@ jobs:

- name: Clean and Build with wasm-pack
run: |
cd packages/rust
cargo clean
wasm-pack build --target web --release

- name: Prepare Demo Directory
run: mkdir -p demo/pkg
run: mkdir -p demos/vanilla-js/pkg

- name: Copy Build Artifacts to Demo
run: cp -r pkg/* demo/pkg/
run: cp -r packages/rust/pkg/* demos/vanilla-js/pkg/

- name: Setup GitHub Pages
uses: actions/configure-pages@v5
Expand Down
Binary file modified .yarn/install-state.gz
Binary file not shown.
20 changes: 20 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
41 changes: 41 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
20 changes: 20 additions & 0 deletions docs/docs/api/wrapper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
**@notemine/wrapper API v0.0.4** • **Docs**

***

# @notemine/wrapper API v0.0.4

## Classes

- [Notemine](classes/Notemine.md)

## Interfaces

- [BestPowData](interfaces/BestPowData.md)
- [CancelledEvent](interfaces/CancelledEvent.md)
- [ErrorEvent](interfaces/ErrorEvent.md)
- [MinedResult](interfaces/MinedResult.md)
- [MinerOptions](interfaces/MinerOptions.md)
- [ProgressEvent](interfaces/ProgressEvent.md)
- [SuccessEvent](interfaces/SuccessEvent.md)
- [WorkerPow](interfaces/WorkerPow.md)
Loading