Skip to content

Commit

Permalink
fix: move env check into job steps
Browse files Browse the repository at this point in the history
  • Loading branch information
karrui committed Sep 3, 2024
1 parent e05f7f9 commit 7a2ac13
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,20 @@ jobs:
chromatic-deployment:
# Operating System
runs-on: ubuntu-latest
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
if: ${{ env.CHROMATIC_PROJECT_TOKEN != '' && !endsWith(github.actor , 'bot') && !endsWith(github.actor, '[bot]')}}
if: ${{ !endsWith(github.actor , 'bot') && !endsWith(github.actor, '[bot]')}}
# Job steps
steps:
- uses: actions/checkout@v4
if: env.CHROMATIC_PROJECT_TOKEN != ''
- uses: ./.github/actions/setup
if: env.CHROMATIC_PROJECT_TOKEN != ''
- name: Load .env file
if: env.CHROMATIC_PROJECT_TOKEN != ''
uses: xom9ikk/dotenv@v2
with:
mode: test
- name: Publish to Chromatic
if: env.CHROMATIC_PROJECT_TOKEN != ''
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
Expand Down

0 comments on commit 7a2ac13

Please sign in to comment.