Skip to content

Commit

Permalink
OH-89 Preview cleaning check the preview is exists
Browse files Browse the repository at this point in the history
  • Loading branch information
terovirtanen committed Apr 26, 2024
1 parent c485ee9 commit fa01055
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/hds-demo-preview-clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,19 @@ jobs:
ssh-key: ${{ secrets.HDSDEMO_SSH_DEPLOY_KEY }}

- name: Remove PR directory
id: remove_preview
run: |
rm -fr ./docs/preview_${{ github.event.number }}
if [ -d "./docs/preview_${{ github.event.number }}" ] ; then
rm -fr ./docs/preview_${{ github.event.number }}
echo "preview_exists=true" >> $GITHUB_OUTPUT
else
echo "preview_exists=false" >> $GITHUB_OUTPUT
fi
working-directory: ./hds-demo

- name: Commit
- name: Commit
if: steps.remove_preview.outputs.preview_exists == 'true'
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
Expand Down

0 comments on commit fa01055

Please sign in to comment.