Skip to content

fix: calculate active nav menu items with location.pathname #48

fix: calculate active nav menu items with location.pathname

fix: calculate active nav menu items with location.pathname #48

Workflow file for this run

name: deploy to gh-pages
on:
push:
branches: [main, test-gh-action]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [16.x]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 'latest'
run_install: false
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build:docs
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v3
with:
target_branch: gh-pages
build_dir: doc-site/dist
# Some chunk files may start with underscores. So we need to disable jekyll. https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}