Use Modelica theme #91
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 Struct | |
| on: | |
| push: | |
| branches-ignore: [ 'temp/*' ] | |
| tags: ['*'] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build-ls-struct: | |
| name: Build Layered Standard Struct | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4.1.7 | |
| 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/headers | |
| mkdir -p build/schema | |
| mkdir -p build/images/schema | |
| - name: Generate HTML | |
| uses: avattathil/asciidoctor-action@master | |
| with: | |
| program: asciidoctor --attribute=revnumber=${{ env.REVNUMBER }} --attribute=revdate=$(date +%F) docs/index.adoc | |
| - name: Create ZIP archive | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: FMI-LS-Struct-${{ env.REVNUMBER }} | |
| path: | | |
| LICENSE.txt build | |
| docs/index.html | |
| docs/images/*.svg | |
| docs/theme/css/*.css | |
| docs/theme/images/*.svg | |
| docs/theme/js/*.js | |
| 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@v3.9.3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: build | |
| destination_dir: ${{ steps.extract_branch.outputs.branch }} | |
| enable_jekyll: true |