-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (36 loc) · 1.35 KB
/
gen_mermaid_png.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Every time a push is made to the reference_flowchart.mmd flowchart, convert to png (sphinx mermaid breaks everything)
name: mermaid_flowchart_to_png
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
paths:
# only watch the following files
- source/user_guide/guide_pages/reference_flowchart.mmd
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# jobs to rin
jobs:
check-bats-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: main
- uses: actions/setup-node@v1
- name: Convert from mmd to png
run: |
npm install @mermaid-js/mermaid-cli
./node_modules/.bin/mmdc -i ./source/user_guide/guide_pages/reference_flowchart.mmd -o ./source/user_guide/guide_pages/reference_flowchart.png
- name: commit changes
run: |
git config --local user.name "kitbenjamin"
git status
git add source/user_guide/guide_pages/reference_flowchart.png
git commit -m "Auto converting reference_flowchart to png"
- name: push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
branch: main