Skip to content

Commit 828b351

Browse files
author
Stefan Cyliax
committed
Fix: Have pipeline on master actually publish
Signed-off-by: Stefan Cyliax <stefan.cyliax@asam.net>
1 parent 3aec788 commit 828b351

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/asciidoc-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ jobs:
5050
working-directory: open-simulation-interface
5151
run: echo ::set-output name=VERSION::$(git describe --always)
5252

53-
5453
- name: Apply versioning to Adoc
5554
uses: jacobtomlinson/gha-find-replace@master
5655
with:
@@ -67,7 +66,7 @@ jobs:
6766
with:
6867
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"
6968

70-
# Upload artifact. This will change to publishing to gh-pages in the future.
69+
# Upload artifact.
7170
- name: Upload HTML Artifact
7271
uses: actions/upload-artifact@v2
7372
if: ${{ github.event_name == 'pull_request' }}
@@ -76,14 +75,15 @@ jobs:
7675
path: open-simulation-interface_V${{ steps.get_version.outputs.VERSION }}.html
7776
if-no-files-found: error
7877

78+
# Publish the artifact when pipeline runs on master
7979
- name: rename file for deploy to gh-page
80-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
80+
if: ${{ github.ref == 'refs/heads/master' }}
8181
run: |
8282
mkdir html/
8383
cp open-simulation-interface_V${{ steps.get_version.outputs.VERSION }}.html html/index.html
8484
8585
- name: deploy to gh-pages if push to master branch
86-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
86+
if: ${{ github.ref == 'refs/heads/master' }}
8787
uses: peaceiris/actions-gh-pages@v3
8888
with:
8989
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)