Skip to content

wip: docs+refactor(namada): document and organize validator method im… #2232

wip: docs+refactor(namada): document and organize validator method im…

wip: docs+refactor(namada): document and organize validator method im… #2232

Workflow file for this run

name: Fadroma (Docs)
on: [push]
jobs:
site:
name: build website
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 0
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
steps:
- name: Get the source with submodules
uses: actions/checkout@v4
with: { submodules: recursive }
- name: Determine default branch
run: |
DEFAULT_BRANCH=$(git remote show origin | awk '/HEAD branch/ {print $NF}')
echo "default_branch=$DEFAULT_BRANCH" >> $GITHUB_ENV
echo "default_branch_ref=refs/heads/$DEFAULT_BRANCH" >> $GITHUB_ENV
- name: Get a Rust toolchain going
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: wasm32-unknown-unknown
override: true
- name: Setup Rust cache
uses: mozilla-actions/[email protected]
- name: Generate Rust reference
uses: actions-rs/cargo@v1
with:
command: doc
args: --all-features --target wasm32-unknown-unknown
- name: Setup Node and PNPM
uses: pnpm/[email protected]
with:
version: 8.5.1
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Render homepage and documentation
run: pnpm docs:render
- name: Generate TS reference
run: NODE_OPTIONS=--max_old_space_size=8192 pnpm docs:typedoc
#- name: Generate TypeScript coverage
# run: pnpm test:lcov || true
- name: Collect docs
run: |
mkdir -p dist/docs dist/docs/api dist/docs/cov
#mv .vitepress/dist/* dist/docs
mv target/doc dist/docs/rs
mv docs dist/docs/ts
#mv coverage/lcov-report dist/docs/cov/ts
mv .docs/* dist/docs
cp -r assets dist/docs
tar -cvf dist/docs/nix shell.nix
- name: Publish docs
if: github.ref_name == 'v2'
run: |
pwd
ls -al
ls -al ~
git remote get-url origin
git fetch --recurse-submodules=no origin gh-pages
cat .git/config
echo $(git show-ref --verify refs/remotes/origin/gh-pages | cut -c-40) > .git/refs/heads/gh-pages
mkdir -p ../page
mv dist/docs/* ../page
cp .gitmodules .. || true
git checkout gh-pages
git submodule deinit -f toolbox || true
git rm -rf toolbox || true
git clean -fdx
rm -rf stable unstable js
cp -rv ../page/* .
#mv ../.gitmodules . || true
ls -alh
git config --global user.email "[email protected]"
git config --global user.name "hack.bg"
git add .
git commit -m "🤖 built docs for ${{ github.ref_name }} @ $(date -u)" || true
git push -u origin gh-pages --force