CI: Only publish docs on stable tags

Also fixes version update not running for workflow_dispatch events.
This commit is contained in:
derrod 2023-02-01 19:48:21 +01:00 committed by Ryan Foster
parent 003241511c
commit fad0c8d401

View file

@ -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