From 1f18221c603fe8e471ddbd0bf2f32e2dca135ea2 Mon Sep 17 00:00:00 2001 From: leoli Date: Thu, 16 May 2024 18:31:08 +0800 Subject: [PATCH] chore: update Mermaid-CLI installation step in workflow --- .github/workflows/docs.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5cc3ef5..e0c2c6d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: jobs: - build: + docs: runs-on: ubuntu-latest permissions: contents: write # Required for pushing changes to the repository @@ -43,7 +43,13 @@ jobs: - uses: actions/setup-node@v4 - name: Install Mermaid-CLI - run: npm install -g @mermaid-js/mermaid-cli + run: | + mkdir ~/.npm-global + npm config set prefix '~/.npm-global' + export PATH=~/.npm-global/bin:$PATH + echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc + source ~/.bashrc + npm install -g @mermaid-js/mermaid-cli - name: Generate README run: make docs