From d820df15c8f87be5c4976d4720e5fa74dee9e851 Mon Sep 17 00:00:00 2001 From: Angus Hollands Date: Mon, 31 Oct 2022 17:04:30 +0000 Subject: [PATCH 1/2] ci: allow pushes to main to deploy --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a9180943b9..00f9aab15d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -169,8 +169,8 @@ jobs: deploy-docs: runs-on: ubuntu-22.04 needs: [build-docs] - # We can only deploy for PRs on host repo - if: github.event.pull_request.head.repo.full_name == github.repository + # We can only deploy for PRs on host repo, or pushes to main + if: ${{ !(github.event_name == "pull_request" && (github.event.pull_request.head.repo.full_name != github.repository)) }} steps: - uses: actions/checkout@v3 From bd608627e26173a94d57e54d254cc31422c46b82 Mon Sep 17 00:00:00 2001 From: Angus Hollands Date: Mon, 31 Oct 2022 17:28:15 +0000 Subject: [PATCH 2/2] ci: use single-quotes --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 00f9aab15d..1dace062cf 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -170,7 +170,7 @@ jobs: runs-on: ubuntu-22.04 needs: [build-docs] # We can only deploy for PRs on host repo, or pushes to main - if: ${{ !(github.event_name == "pull_request" && (github.event.pull_request.head.repo.full_name != github.repository)) }} + if: ${{ !(github.event_name == 'pull_request' && (github.event.pull_request.head.repo.full_name != github.repository)) }} steps: - uses: actions/checkout@v3