Skip to content

Commit

Permalink
Skip build_and_deploy on docs-only changes
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Dec 8, 2024
1 parent c291ff6 commit 2830d7b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,19 @@ jobs:
elif [ '${{ github.event_name }}' == 'workflow_dispatch' ]
then
echo "value=force-preview" >> $GITHUB_OUTPUT
elif [[ $(node scripts/run-for-change.js --not --type docs --exec echo 'false') != 'false' ]];
then
echo "value=skipped" >> $GITHUB_OUTPUT
else
echo "value=automated-preview" >> $GITHUB_OUTPUT
fi
- name: Print deploy target
run: echo "Deploy target is '${{ steps.deploy-target.outputs.value }}'"

build:
if: ${{ needs.deploy-target.outputs.value != 'skipped' }}
needs:
- deploy-target
runs-on: ubuntu-latest
env:
NEXT_TELEMETRY_DISABLED: 1
Expand Down Expand Up @@ -96,6 +102,7 @@ jobs:

# Build binaries for publishing
build-native:
if: ${{ needs.deploy-target.outputs.value != 'skipped' }}
needs:
- deploy-target
defaults:
Expand Down Expand Up @@ -380,6 +387,9 @@ jobs:
path: .turbo/runs

build-wasm:
if: ${{ needs.deploy-target.outputs.value != 'skipped' }}
needs:
- deploy-target
strategy:
matrix:
target: [web, nodejs]
Expand Down

0 comments on commit 2830d7b

Please sign in to comment.