Markdown -> Ecore resource contents filter work in progress #6
This file contains hidden or 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 Ecore documentation HTML Site with Nasdanika CLI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Download Nasdanika CLI | |
| run: wget https://github.com/Nasdanika/cli/releases/download/maven-2026.2.0/nsd-cli.zip | |
| - name: Unzip Nasdanika CLI | |
| run: unzip nsd-cli.zip | |
| - name: Setup Graphviz | |
| uses: ts-graphviz/setup-graphviz@v2 | |
| - name: Generate ecore doc | |
| working-directory: nsd-cli | |
| run: | | |
| chmod u+x nsd | |
| pwd | |
| ls .. | |
| ./nsd xcore ../model/model/markdown.xcore doc --diagram=markdown.drawio --doc-stubs --doc-dir=../model/doc save ../model/markdown.xmi | |
| - name: Generate Ecore site | |
| working-directory: nsd-cli | |
| run: | | |
| ./nsd model ../model/root-action.yml labels site -r=-1 -F ../model/page-template.yml ../docs | |
| cp markdown.drawio ../docs | |
| cp -R ../images ../docs | |
| zip -r ../docs/doc-stubs.zip ../model/doc | |
| ls ../docs | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| # Upload entire repository | |
| path: 'docs' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 | |
| # Uncomment to troubleshoot: | |
| # - name: Setup upterm session | |
| # uses: lhotari/action-upterm@v1 | |
| # if: ${{ failure() }} | |
| # with: | |
| # ## If no one connects after 5 minutes, shut down server. | |
| # wait-timeout-minutes: 5 |