Make markdownlint happy #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Mindmap | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
paths: | |
- ".github/workflows/generate-mindmap.yml" | |
- "pattern-categorization/innersource-program-mind-map.md" | |
- "pattern-categorization/package.json" | |
- "pattern-categorization/gl/*" | |
- "pattern-categorization/pt-br/*" | |
defaults: | |
run: | |
working-directory: pattern-categorization | |
jobs: | |
generate-mindmap: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
folder: [".", "./gl", "./pt-br"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
cache-dependency-path: pattern-categorization/package-lock.json | |
- name: Install Node.js dependencies | |
run: npm install | |
- name: Run Markmap | |
run: npx markmap --no-toolbar ${{ matrix.folder }}/innersource-program-mind-map.md -o ${{ matrix.folder }}/innersource-program-mind-map.html | |
- name: Screenshot Markmap Website | |
id: screenshot-generator | |
uses: swinton/[email protected] | |
with: | |
source: pattern-categorization/${{ matrix.folder }}/innersource-program-mind-map.html #strange syntax here. seems to not respect the working-directory default either | |
destination: innersource-program-mind-map.png | |
full-page: false | |
- name: Copy Screenshot | |
run: cp ${{ steps.screenshot-generator.outputs.path }} ${{ matrix.folder }} | |
- name: Reduce Screenshot Size (PNG) | |
run: npx optipng ${{ matrix.folder }}/innersource-program-mind-map.png | |
- name: Commit Changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Re-creating markmap and screenshot |