From 7967fbf28f9214d977f2b1335197c4a293664240 Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Mon, 8 Apr 2024 10:40:16 +0200 Subject: [PATCH] ci: fix preview cleanup Bug was that on PR close event, ref_name is already main. New expression tries to match the non-preview event and negates it instead, hope that's a bit more robust. Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- .github/workflows/docs_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs_publish.yml b/.github/workflows/docs_publish.yml index 7b3b0d3a3..89b7bf145 100644 --- a/.github/workflows/docs_publish.yml +++ b/.github/workflows/docs_publish.yml @@ -29,7 +29,7 @@ jobs: name: Publish docs to GitHub Pages runs-on: ubuntu-22.04 env: - PREVIEW: ${{ github.event_name == 'pull_request' && github.ref_name != 'main' }} + PREVIEW: ${{ !(github.event_name == 'push' && github.ref_name == 'main') }} steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - uses: ./.github/actions/setup_nix