Skip to content

Commit

Permalink
chore(github): tune ci check
Browse files Browse the repository at this point in the history
  • Loading branch information
solareon committed Jun 29, 2024
1 parent af323fc commit 6890b1b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,41 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Check for changes in UI directory
id: check_changes
run: |
if git diff --quiet HEAD^ HEAD -- ui; then
echo "No changes in UI directory. Skipping step."
echo "::set-output name=skip_step::true"
echo "skip_step=true" >> $GITHUB_ENV
else
echo "Changes detected in UI directory. Proceeding with step."
echo "::set-output name=skip_step::false"
echo "skip_step=false" >> $GITHUB_ENV
fi
- name: Install pnpm
if: steps.check_changes.outputs.skip_step != 'true'
if: env.skip_step == 'false'
uses: pnpm/action-setup@v4
with:
version: 9

- name: Setup node environment
if: steps.check_changes.outputs.skip_step != 'true'
if: env.skip_step == 'false'
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "pnpm"
cache-dependency-path: "ui/pnpm-lock.yaml"

- name: Install deps
if: steps.check_changes.outputs.skip_step != 'true'
if: env.skip_step == 'false'
run: pnpm install --frozen-lockfile
working-directory: ui

- name: Try build
if: steps.check_changes.outputs.skip_step != 'true'
if: env.skip_step == 'false'
run: pnpm build
working-directory: ui
env:
Expand Down

0 comments on commit 6890b1b

Please sign in to comment.