SimpleDAE.fmu FMI-LS-DAE + ODE reference FMU #154
Workflow file for this run
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: Build Layered Standard DAE | |
| on: | |
| push: | |
| branches-ignore: [ 'temp/*' ] | |
| tags: | |
| - '*' | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build-ls-dae: | |
| name: Build Layered Standard DAE | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| submodules: recursive | |
| - name: Generate revnumber | |
| run: | | |
| [[ $GITHUB_REF_TYPE == "tag" ]] && REVNUMBER=${GITHUB_REF:11} || REVNUMBER=${GITHUB_SHA:0:7} | |
| echo GITHUB_SHA: $GITHUB_SHA | |
| echo GITHUB_REF_TYPE: $GITHUB_REF_TYPE | |
| echo GITHUB_REF: $GITHUB_REF | |
| echo REVNUMBER: $REVNUMBER | |
| echo "REVNUMBER=$REVNUMBER" >> $GITHUB_ENV | |
| - name: Create build directory | |
| run: | | |
| mkdir -p build/schema | |
| - name: Build HTML | |
| uses: avattathil/asciidoctor-action@755dc03a42aee715c3705fc31d2ca106b7ee90fd # v2 | |
| with: | |
| program: "asciidoctor --destination-dir=build --attribute=revnumber=${{ env.REVNUMBER }} --attribute=revdate=$(date +%F) --failure-level=WARN --backend=html5 --verbose docs/index.adoc" | |
| - name: Build PDF | |
| run: | | |
| docker run --rm -v $PWD:/documents/ asciidoctor/docker-asciidoctor \ | |
| asciidoctor-pdf \ | |
| -r asciidoctor-mathematical \ | |
| -a source-highlighter=rouge \ | |
| -a mathematical-format=svg \ | |
| --base-dir /documents/docs \ | |
| --destination-dir /documents/build \ | |
| --failure-level WARN \ | |
| --verbose \ | |
| --attribute=revnumber=${{ env.REVNUMBER }} \ | |
| --attribute=revdate=$(date +%F) \ | |
| docs/index.adoc | |
| - name: Copy resources | |
| run: | | |
| cp LICENSE.txt build | |
| cp schema/*.xsd build/schema | |
| cp -r docs/images build/images | |
| cp -r docs/theme/ build/theme | |
| - name: Archive layered standard DAE | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: FMI-LS-DAE | |
| path: build/* | |
| if-no-files-found: error | |
| - name: Extract branch name | |
| id: extract_branch | |
| shell: bash | |
| run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT | |
| - name: Deploy | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: build | |
| destination_dir: ${{ steps.extract_branch.outputs.branch }} | |
| enable_jekyll: true |