@@ -3,16 +3,16 @@ name: AsciiDoc Documentation Build
33on :
44 create : # new branches or tags
55 release : # new releases
6- pull_request :
6+ pull_request :
77 branches : [ master ]
88 push : # on push. This may be removed later
99 schedule : # periodic - needed because some of the content is from the other repos
1010 - cron : ' 30 5,20 * * *' # this is pretty often. Only needed during review phase
1111
12- jobs :
12+ jobs :
1313 asciidoctor-build :
1414 name : Run Asciidoctor on Documentation
15-
15+
1616 runs-on : ubuntu-18.04
1717
1818 steps :
3030 repository : OpenSimulationInterface/open-simulation-interface
3131 path : open-simulation-interface
3232 fetch-depth : 0
33-
33+
3434
3535 - name : Checkout OSI Sensor Model Packaging
3636 uses : actions/checkout@v2
@@ -49,36 +49,36 @@ jobs:
4949 id : get_version
5050 working-directory : open-simulation-interface
5151 run : echo ::set-output name=VERSION::$(git describe --always)
52-
52+
53+ # replaces the placeholder for versioning in the main mapping file
5354 - name : Apply versioning to Adoc
54- uses : jacobtomlinson/gha-find-replace@master
55- with :
56- find : " :revnumber: --localbuild--"
57- replace : " :revnumber: master (${{ steps.get_version.outputs.VERSION }})"
58- include : " index.adoc"
55+ run : |
56+ grep ":revnumber:" index.adoc
57+ sed -i -e "s/--localbuild--/master (${{ steps.get_version.outputs.VERSION }})/" index.adoc
58+ grep ":revnumber:" index.adoc
5959
6060 - name : Remove docdate for online hosted document
6161 run : sed 's/^:revdate:.*/:!revdate:/' index.adoc
62-
62+
6363 # run Asciidoctor
6464 - name : Build HTML
6565 uses : avattathil/asciidoctor-action@master
6666 with :
6767 program : " asciidoctor -D . --failure-level WARN -r asciidoctor-diagram -r asciidoctor-bibtex -a mathjax --trace --backend=html5 index.adoc -o open-simulation-interface_V${{ steps.get_version.outputs.VERSION }}.html"
6868
69- # Upload artifact.
69+ # Upload artifact.
7070 - name : Upload HTML Artifact
7171 uses : actions/upload-artifact@v2
7272 if : ${{ github.event_name == 'pull_request' }}
7373 with :
7474 name : HTML document
7575 path : open-simulation-interface_V${{ steps.get_version.outputs.VERSION }}.html
76- if-no-files-found : error
76+ if-no-files-found : error
7777
7878 # Publish the artifact when pipeline runs on master
7979 - name : rename file for deploy to gh-page
8080 if : ${{ github.ref == 'refs/heads/master' }}
81- run : |
81+ run : |
8282 mkdir html/
8383 cp open-simulation-interface_V${{ steps.get_version.outputs.VERSION }}.html html/index.html
8484
0 commit comments