Skip to content

chore: add visualize cmd #7

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
98 changes: 51 additions & 47 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,59 @@ on:
workflow_dispatch: # Enables on-demand/manual triggering
push:
branches:
- main
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Restore Node modules cache
uses: actions/cache@v2
id: node-modules-cache
with:
path: |
node_modules
.next/*
!.next/.next/cache
!.next/.env.*
key: ${{ runner.os }}-dendronv2-${{ hashFiles('**/yarn.lock', '**/package-lock.json') }}-4

- name: Contents of next
run: "(test -d .next) && ls .next || echo 'no next file'"

- name: Install dependencies
run: npm install

- name: Initialize or pull nextjs template
run: "(test -d .next) && (echo 'updating dendron next...' && cd .next && git reset --hard && git pull && yarn && cd ..) || (echo 'init dendron next' && yarn dendron publish init)"

- name: Contents of next
run: "(test -d .next) && ls .next || echo 'no next file'"

- name: Restore Next cache
uses: actions/cache@v2
with:
path: .next/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('.next/yarn.lock', '.next/package-lock.json') }}-${{ hashFiles('.next/**.[jt]s', '.next/**.[jt]sx') }}-1

- name: Export notes
run: yarn dendron publish export --target github --yes

- name: Deploy site
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: pages
publish_dir: docs/
force_orphan: true
#cname: example.com
- name: Checkout source
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Restore Node modules cache
uses: actions/cache@v2
id: node-modules-cache
with:
path: |
node_modules
.next/*
!.next/.next/cache
!.next/.env.*
key: ${{ runner.os }}-dendronv2-${{ hashFiles('**/yarn.lock', '**/package-lock.json') }}-4

- name: Contents of next
run: "(test -d .next) && ls .next || echo 'no next file'"

- name: Install dependencies
run: npm install

- name: Initialize or pull nextjs template
run: "(test -d .next) && (echo 'updating dendron next...' && cd .next && git reset --hard && git pull && yarn && cd ..) || (echo 'init dendron next' && yarn dendron publish init)"

- name: Contents of next
run: "(test -d .next) && ls .next || echo 'no next file'"

- name: Generate packed circled visualization of vaults
run: 'yarn dendron visualize --out ./docs/assets'
working-directory: '.'

- name: Restore Next cache
uses: actions/cache@v2
with:
path: .next/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('.next/yarn.lock', '.next/package-lock.json') }}-${{ hashFiles('.next/**.[jt]s', '.next/**.[jt]sx') }}-1

- name: Export notes
run: yarn dendron publish export --target github --yes

- name: Deploy site
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: pages
publish_dir: docs/
force_orphan: true
#cname: example.com