Skip to content

Commit

Permalink
attempt to split jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghislain89 committed Jun 11, 2024
1 parent ce915a2 commit 507216c
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,10 @@ env:


jobs:
deploy:
shouldDeploy:
name: ${{ inputs.app }}
if: ${{ github.repository_owner == 'kadena-community' }} // Prevents auto deploying forks.

environment:
name: ${{ inputs.app }} - Preview
url: ${{ steps.deployment.outputs.url }}


runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -62,7 +58,26 @@ jobs:
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
outputs:
changed: ${{ steps.detectChanges.outputs.changed }}
deploy:
name: ${{ inputs.app }}
needs: shouldDeploy
if: ${{ needs.shouldDeploy.outputs.changed == 'true' }}
environment:
name: ${{ inputs.app }} - Preview
url: ${{ steps.deployment.outputs.url }}

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
show-progress: false

- name: Runner Setup
uses: ./.github/actions/runner-setup

- name: Install Vercel CLI
if: steps.detectChanges.outputs.changed == 'true'
run: pnpm add --global vercel@34.2.5
Expand Down

0 comments on commit 507216c

Please sign in to comment.