Skip to content

Commit

Permalink
chore: publish to production only from branches with names starting w…
Browse files Browse the repository at this point in the history
…ith "release", publish to staging from anywhere

Co-authored-by: Anton Arnautov <43254280+arnautov-anton@users.noreply.github.com>
  • Loading branch information
MartinCupela and arnautov-anton committed May 23, 2024
1 parent 60d430a commit c77e367
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ jobs:
docs_release:
name: Publish documentation from "${{ github.ref_name }}" branch to ${{ inputs.docs_env }}
runs-on: ubuntu-latest
# skip during dry runs, release to production only from master, release to staging from anywhere
if: ${{ !inputs.dry_run && ((startsWith(github.ref_name, 'release') && contains('production,staging', inputs.docs_env)) || inputs.docs_env == 'staging') }}
# skip during dry runs, publish to production only from branches with names starting with "release", publish to staging from anywhere
if: ${{ !inputs.dry_run && ((startsWith(github.ref_name, "release") && inputs.docs_env == "production") || inputs.docs_env == "staging") }}
outputs:
target-version: $${{ steps.target-version.outputs }}
steps:
Expand Down

0 comments on commit c77e367

Please sign in to comment.