Skip to content

Commit d1e7a87

Browse files
add document
1 parent c4f897a commit d1e7a87

File tree

8 files changed

+1575
-0
lines changed

8 files changed

+1575
-0
lines changed

.github/workflows/docs.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "docs/**"
9+
- "learn/**"
10+
- ".github/workflows/docs.yaml"
11+
12+
env:
13+
# Repository specific variables
14+
REPO_NAME: interchain-kit
15+
DOCS_DEST_PATH: pages/interchain-kit
16+
LEARN_DEST_PATH: src/data/learn/interchain-kit
17+
18+
jobs:
19+
docs-deploy:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: '20'
30+
enable-global-cache: true
31+
32+
- name: Clone docs repository
33+
run: git clone https://x-access-token:${{ secrets.GH_HYPERWEB_PAT }}@github.com/hyperweb-io/docs.hyperweb.io.git external-docs
34+
35+
- name: Sync the docs and build
36+
run: |
37+
rsync -av --delete ./docs/ ./external-docs/${{ env.DOCS_DEST_PATH }}/
38+
cd external-docs
39+
yarn install
40+
yarn export
41+
42+
- name: Git push
43+
run: |
44+
cd external-docs
45+
git config user.name 'GitHub Action'
46+
git config user.email '[email protected]'
47+
git add .
48+
if git diff --cached --quiet; then
49+
echo "No changes to commit."
50+
else
51+
git commit -m "Automated: Update ${{ env.REPO_NAME }} documentation"
52+
git push
53+
fi

docs/_meta.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"index": "Introduction",
3+
"installation": "Installation",
4+
"quickstart": "Quick Start",
5+
"usage": "Usage",
6+
"configuration": "Configuration"
7+
}

0 commit comments

Comments
 (0)