2929 with :
3030 repository : OpenSimulationInterface/open-simulation-interface
3131 path : open-simulation-interface
32+ fetch-depth : 0
33+
3234
3335 - name : Checkout OSI Sensor Model Packaging
3436 uses : actions/checkout@v2
@@ -45,16 +47,19 @@ jobs:
4547 # Versioning
4648 - name : Get versioning
4749 id : get_version
48- run : echo ::set-output name=VERSION::$(git describe --tags --always | sed 's/^v//')
50+ working-directory : open-simulation-interface
51+ run : echo ::set-output name=VERSION::$(git describe --always)
4952
5053
5154 - name : Apply versioning to Adoc
5255 uses : jacobtomlinson/gha-find-replace@master
5356 with :
5457 find : " :revnumber: --localbuild--"
55- replace : " :revnumber: ${{ steps.get_version.outputs.VERSION }}"
58+ replace : " :revnumber: master ( ${{ steps.get_version.outputs.VERSION }}) "
5659 include : " index.adoc"
5760
61+ - name : Remove docdate for online hosted document
62+ run : sed 's/^:revdate:.*/:!revdate:/' index.adoc
5863
5964 # run Asciidoctor
6065 - name : Build HTML
6469
6570 # Upload artifact. This will change to publishing to gh-pages in the future.
6671 - name : Upload HTML Artifact
67- uses : actions/upload-artifact@v1
72+ uses : actions/upload-artifact@v2
73+ if : ${{ github.event_name == 'pull_request' }}
6874 with :
6975 name : HTML document
7076 path : open-simulation-interface_V${{ steps.get_version.outputs.VERSION }}.html
77+ if-no-files-found : error
78+
79+ - name : rename file for deploy to gh-page
80+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
81+ run : |
82+ mkdir html/
83+ cp open-simulation-interface_V${{ steps.get_version.outputs.VERSION }}.html html/index.html
7184
72-
85+ - name : deploy to gh-pages if push to master branch
86+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
87+ uses : peaceiris/actions-gh-pages@v3
88+ with :
89+ github_token : ${{ secrets.GITHUB_TOKEN }}
90+ publish_dir : ./html
0 commit comments