Skip to content

Commit

Permalink
ci: disable preview attempts on fork (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
NoamGaash authored Dec 15, 2023
1 parent 5e44215 commit 264653b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,22 @@ on:

env:
ASSET_URL: https://s3.amazonaws.com/noam-gaash.co.il/${{ github.run_id }}/open-bus/${{ github.sha }}

should_run: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
jobs:
should_run:
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.set_should_run.outputs.should_run }}
steps:
- name: Set should_run
id: set_should_run
if: env.should_run
run: echo "::set-output name=should_run::true"

build:
runs-on: ubuntu-latest
needs: [should_run]
if: ${{ needs.should_run.outputs.should_run == 'true' }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand All @@ -27,6 +39,8 @@ jobs:
path: dist
build-storybook:
runs-on: ubuntu-latest
needs: [should_run]
if: ${{ needs.should_run.outputs.should_run == 'true' }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down

0 comments on commit 264653b

Please sign in to comment.