mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-22 01:31:25 -08:00
* Fix MD files with broken links - fixing all broken links - all YML files are now in capital case * Add PR template * remove comments
52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
name: 'Compile Mermaid to MD'
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'docs/**/*.mmd'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Project
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- name: Get Changed Files
|
|
id: getfile
|
|
run: |
|
|
echo "::set-output name=files::$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | grep -e '.*\.mmd$' | xargs)"
|
|
|
|
- name: Print mmd Files Changed
|
|
run: |
|
|
echo ${{ steps.getfile.outputs.files }}
|
|
|
|
- name: Compile Mermaid Files
|
|
uses: neenjaw/compile-mermaid-markdown-action@0.3.1
|
|
with:
|
|
files: ${{ steps.getfile.outputs.files }}
|
|
output: '.resources'
|
|
env:
|
|
HIDE_CODEBLOCKS: 1
|
|
ABSOLUTE_IMAGE_LINKS: 1
|
|
OUTPUT_FILE_TYPE: "svg"
|
|
|
|
- name: Show Changes
|
|
run: |
|
|
git status
|
|
|
|
- name: Commit Files
|
|
run: |
|
|
git config --local user.email "action@github.com"
|
|
git config --local user.name "GitHub Action"
|
|
git add -A
|
|
git diff-index --quiet HEAD || git commit -a -m 'Updating Diagram'
|
|
|
|
- name: Push Changes
|
|
uses: ad-m/github-push-action@master
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
branch: ${{ github.ref }}
|