From fad0c8d401344d4ee4c04824dcd5c63c830667b8 Mon Sep 17 00:00:00 2001 From: derrod Date: Wed, 1 Feb 2023 19:48:21 +0100 Subject: [PATCH] CI: Only publish docs on stable tags Also fixes version update not running for workflow_dispatch events. --- .github/workflows/docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 36e534a20..f906bc81d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -34,7 +34,7 @@ jobs: - name: Bump Version Number shell: bash - if: github.event_name == 'push' + if: github.event_name != 'pull_request' run: | VERTEST="\#define\sLIBOBS_API_\w+_VER\s([0-9]{1,2})" VER="" @@ -91,6 +91,7 @@ jobs: echo "/previous/:major.:minor https://:major-:minor.${{ vars.CF_PAGES_PROJECT }}.pages.dev 302" >> docs/_redirects - name: Publish to live page + if: ${{ !contains(needs.docs.outputs.commitBranch, 'beta') && !contains(needs.docs.outputs.commitBranch, 'rc') }} uses: cloudflare/wrangler-action@4c10c1822abba527d820b29e6333e7f5dac2cabd with: workingDirectory: docs