diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 31ee0e8bee622ccf4aef08d5410efb8eec6684a7..dc756884a7bbd61aaf37c66517a7e0b3d46f5e54 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -24,7 +24,26 @@ jobs: # https://github.com/actions/virtual-environments runs-on: ubuntu-latest - if: ${{ (github.event_name == 'pull_request' && (github.event_type == 'synchronize' || ((github.event_type == 'labeled' || github.event_type == 'unlabeled') && github.event.label.name == 'preview'))) || github.event_name != 'pull_request' }} + if: | + ${{ + ( + github.event_name == 'pull_request' && + ( + ( + github.event.action == 'synchronize' && + contains(github.event.pull_request.labels.*.name, 'preview') + ) || + ( + ( + github.event.action == 'labeled' || + github.event.action == 'unlabeled' + ) && + github.event.label.name == 'preview' + ) + ) + ) || + github.event_name != 'pull_request' + }} steps: