Skip to content

chore: update Mermaid-CLI installation step in workflow #13

chore: update Mermaid-CLI installation step in workflow

chore: update Mermaid-CLI installation step in workflow #13

Workflow file for this run

name: update README files
on:
push:
branches:
- main
workflow_dispatch:
jobs:
docs:
runs-on: ubuntu-latest
permissions:
contents: write # Required for pushing changes to the repository
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Required Packages
run: |
sudo apt update && \
sudo apt upgrade -y && \
sudo apt install -y \
make \
jq \
unzip \
texlive-latex-base \
texlive-fonts-recommended \
texlive-fonts-extra \
texlive-latex-extra \
texlive-xetex
- name: Install Pandoc
run: |
LATEST_RELEASE_URL=$(curl -s https://api.github.com/repos/jgm/pandoc/releases/latest | jq -r '.assets[] | select(.name | endswith("-linux-amd64.tar.gz")) | .browser_download_url' | head -n 1) && \
curl -L -o pandoc.tar.gz $LATEST_RELEASE_URL && \
sudo tar -xvzf pandoc.tar.gz --strip-components 1 -C /usr/local && \
rm pandoc.tar.gz && \
pandoc --version
- name: Install Pandoc Filters
run: make docs-install
- uses: actions/setup-node@v4
- name: Install 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
- name: Commit and Push Changes
run: |
git config --local user.email "${{ github.actor }}@users.noreply.github.com"
git config --local user.name "${{ github.actor }}"
git add README.md README.pdf
git diff --cached --quiet || git commit -m "Update README files"
git push origin main