-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change website to vuepress hope theme
- Loading branch information
1 parent
efda2c7
commit 06cbe60
Showing
90 changed files
with
6,686 additions
and
393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,33 +2,49 @@ name: Detect Changes | |
description: Defines variables indicating the parts of the code that changed | ||
outputs: | ||
isDoc: | ||
description: True when changes happened to some documentation | ||
description: True when changes related to documentation | ||
value: "${{ steps.diff.outputs.isDoc }}" | ||
isRust: | ||
description: True when changes happened to the Rust code | ||
description: True when changes related to Rust | ||
value: "${{ steps.diff.outputs.isRust }}" | ||
isMove: | ||
description: True when changes happened to the Move code | ||
description: True when changes related to Move | ||
value: "${{ steps.diff.outputs.isMove }}" | ||
|
||
isScript: | ||
description: True when changes related suibase scripts | ||
value: "${{ steps.diff.outputs.isScript }}" | ||
isDocHelperAPI: | ||
description: True when changes to Helper API (docs) | ||
value: "${{ steps.diff.outputs.isDoc }}" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Detect Changes | ||
uses: dorny/[email protected] | ||
id: diff | ||
with: | ||
filters: | | ||
isRust: | ||
- 'crates/**' | ||
- '.github/workflows/rust.yml' | ||
isDoc: | ||
- 'docs/**' | ||
- 'mkdocs.yml' | ||
- '*.md' | ||
- '.github/workflows/docs.yml' | ||
isMove: | ||
- 'move/sources/**' | ||
- 'Cargo.toml' | ||
- 'Cargo.lock' | ||
- uses: actions/checkout@v3 | ||
- name: Detect Changes | ||
uses: dorny/[email protected] | ||
id: diff | ||
with: | ||
filters: | | ||
isRust: | ||
- 'rust/**' | ||
- '.github/workflows/rust.yml' | ||
isDoc: | ||
- 'docs/**' | ||
- 'README.md' | ||
- '.github/workflows/deploy-docs.yml' | ||
isMove: | ||
- 'move/sources/**' | ||
- 'Move.toml' | ||
isScript: | ||
- 'scripts/**' | ||
- 'install' | ||
- 'uninstall' | ||
- 'update' | ||
- 'repair' | ||
- 'pip-install' | ||
- '.github/workflows/scripts-tests.yml' | ||
isDocHelperAPI: | ||
- 'rust/helper/lib.rs' | ||
- 'rust/helper/error.rs' | ||
- '.github/workflows/trig-ext-repos.yml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Deploy Vuepress | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
diff: | ||
runs-on: [ubuntu-latest] | ||
outputs: | ||
isDoc: ${{ steps.diff.outputs.isDoc }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Detect Changes | ||
uses: "./.github/actions/diffs" | ||
id: diff | ||
|
||
deploy-gh-pages: | ||
needs: diff | ||
if: ${{ (needs.diff.outputs.isDoc == 'true') || (github.event_name == 'workflow_dispatch') }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
run_install: true | ||
|
||
- name: Copy pnpm dependency files | ||
run: | | ||
cp -f $GITHUB_WORKSPACE/docs/ci/pnpm-lock.yaml.ci $GITHUB_WORKSPACE/docs/pnpm-lock.yaml | ||
cp -f $GITHUB_WORKSPACE/docs/ci/package.json.ci $GITHUB_WORKSPACE/docs/package.json | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: pnpm | ||
cache-dependency-path: "docs/pnpm-lock.yaml" | ||
|
||
- name: Build Docs | ||
env: | ||
NODE_OPTIONS: --max_old_space_size=8192 | ||
run: |- | ||
cd docs | ||
pnpm run docs:build | ||
> src/.vuepress/dist/.nojekyll | ||
- name: Deploy Docs | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
# This is the branch where the docs are deployed to | ||
branch: gh-pages | ||
folder: docs/src/.vuepress/dist |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
node_modules/ | ||
src/.vuepress/.cache/ | ||
src/.vuepress/.temp/ | ||
src/.vuepress/dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
DO NOT MODIFY the files in this directory | ||
Do not update these files. | ||
|
||
**What are they for?** | ||
|
||
They are used by github action for CI deployment. | ||
|
||
Only the maintainer of the website update these. | ||
|
||
This is done such that minor difference in | ||
installation in someones setup does not clash | ||
with the intent from the website maintainers. | ||
|
||
**How to update?** | ||
From root of the docs: | ||
cp package.json ci/package.json.ci | ||
cp pnpm-lock.yaml ci/pnpm-lock.yaml.ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "dtp", | ||
"version": "0.0.1", | ||
"description": "Decentralized Transport Protocol", | ||
"license": "Apache 2.0", | ||
"type": "module", | ||
"scripts": { | ||
"start": "vuepress dev src", | ||
"docs:build": "vuepress-vite build src", | ||
"docs:clean-dev": "vuepress-vite dev src --clean-cache", | ||
"docs:dev": "vuepress-vite dev src", | ||
"docs:update-package": "pnpm dlx vp-update" | ||
}, | ||
"devDependencies": { | ||
"@vuepress/bundler-vite": "2.0.0-rc.7", | ||
"vue": "^3.4.19", | ||
"vuepress": "2.0.0-rc.7", | ||
"vuepress-theme-hope": "2.0.0-rc.23" | ||
} | ||
} |
Oops, something went wrong.