Fix deploy condition in docs-publishing workflow (#180) #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
concurrency: | |
group: ci-on-${{ github.event_name }}-from-${{ github.ref_name }} | |
cancel-in-progress: true | |
on: | |
# run on pushes to certain branches | |
push: | |
branches: | |
- "main" | |
- "release/v[0-9][0-9].[0-9][0-9].[0-9][0-9]" | |
# run on pushes of any tags | |
tags: | |
- "*" | |
# run by clicking buttons in the GitHub Actions UI | |
workflow_dispatch: | |
inputs: | |
deploy-docs: | |
description: 'Update the docs site?' | |
required: true | |
type: boolean | |
jobs: | |
conda-python-build: | |
uses: ./.github/workflows/conda-python-build.yaml | |
with: | |
script: "ci/build_python.sh" | |
secrets: inherit | |
upload-conda: | |
needs: | |
- conda-python-build | |
uses: ./.github/workflows/conda-upload-packages.yaml | |
secrets: inherit | |
docs-build: | |
needs: | |
- conda-python-build | |
uses: ./.github/workflows/docs-build.yaml | |
with: | |
script: "ci/build_docs.sh" | |
# only deploy docs on tag pushes or when someone manually runs the workflow | |
deploy: ${{ github.event_name == 'tag' || inputs.deploy_docs == true }} | |
secrets: inherit |