Browse Source

CI: Only publish docs on stable tags

Also fixes version update not running for workflow_dispatch events.
derrod 2 years ago
parent
commit
fad0c8d401
1 changed files with 2 additions and 1 deletions
  1. 2 1
      .github/workflows/docs.yml

+ 2 - 1
.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