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 25b12b5 commit af323fc
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,39 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- 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"
else
echo "Changes detected in UI directory. Proceeding with step."
echo "::set-output name=skip_step::false"
fi
- name: Install pnpm
if: steps.check_changes.outputs.skip_step != 'true'
uses: pnpm/action-setup@v4
with:
version: 9

- name: Setup node environment
if: steps.check_changes.outputs.skip_step != 'true'
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'
run: pnpm install --frozen-lockfile
working-directory: ui

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

0 comments on commit af323fc

Please sign in to comment.