Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel86 authored Sep 3, 2024
1 parent 7374723 commit 803b73e
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
cd ros_ws
catkin_make_isolated
- name: Run unit tests
if: ${{github.event_name == 'push' || github.event_name == 'pull_request'}}
if: github.event_name == 'push' || github.event_name == 'pull_request'
shell: bash
run: |
sudo systemctl start mongod
Expand All @@ -53,7 +53,7 @@ jobs:
action_fail_on_inconclusive: true
#####
- name: Run doxygen
if: ${{github.event_name == 'push' || github.event_name == 'release'}}
if: github.event_name == 'push' || github.event_name == 'release'
shell: bash
run: |
cd $GITHUB_WORKSPACE/ros_ws/build_isolated/knowrob
Expand All @@ -63,20 +63,22 @@ jobs:
mv $GITHUB_WORKSPACE/ros_ws/src/knowrob/.git $GITHUB_WORKSPACE/
mv $GITHUB_WORKSPACE/ros_ws/src/knowrob/* $GITHUB_WORKSPACE/
- name: Extract version tag
if: ${{github.event_name == 'release'}}
if: github.event_name == 'release'
shell: bash
# Extract major.minor version from tag
#run: echo "##[set-output name=doc_version;]$(echo ${GITHUB_REF#refs/tags/})"
run: echo "##[set-output name=version;]$(echo ${GITHUB_REF#refs/tags/} | cut -d'.' -f1,2)"
id: docu_version
#run: echo "##[set-output name=version;]$(echo ${GITHUB_REF#refs/tags/} | cut -d'.' -f1,2)"
run: echo "KNOWROB_DOCU_VERSION=$(echo ${GITHUB_REF#refs/tags/} | cut -d'.' -f1,2)"
#id: docu_version
- name: Extract branch name
if: ${{github.event_name == 'push'}}
if: github.event_name == 'push'
shell: bash
# Use branch name as version
run: echo "##[set-output name=version;]$(echo ${GITHUB_REF#refs/heads/})"
id: docu_version
#run: echo "##[set-output name=version;]$(echo ${GITHUB_REF#refs/heads/})"
run: echo "KNOWROB_DOCU_VERSION=$(echo ${GITHUB_REF#refs/heads/})"
#id: docu_version
- name: Deploy doc to gh-pages
if: ${{github.event_name == 'push' || github.event_name == 'release'}}
if: github.event_name == 'push' || github.event_name == 'release'
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -85,6 +87,7 @@ jobs:
# The folder the action should deploy.
FOLDER: doc/html
# The folder in the target branch
TARGET_FOLDER: ${{ steps.docu_version.outputs.version }}
# TARGET_FOLDER: ${{ steps.docu_version.outputs.version }}
TARGET_FOLDER: ${{ env.KNOWROB_DOCU_VERSION }}
CLEAN: true
SINGLE_COMMIT: true

0 comments on commit 803b73e

Please sign in to comment.