Skip to content
Discussion options

You must be logged in to vote

Ok, I see it's expected behavior because of the action: auto. Removed it and separated in two steps to always run the cleanup when PR is closed:

      - name: Create Preview
        uses: rossjrw/pr-preview-action@v1
        if: contains(github.event.pull_request.labels.*.name, 'pr-preview') && github.event.action != 'closed'
        with:
          action: deploy

and

      - name: Remove Preview
        uses: rossjrw/pr-preview-action@v1
        if: github.event.action == 'closed'
        with:
          action: remove

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by lumi017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #127 on January 14, 2026 09:37.