Skip to content

Commit 75d3e83

Browse files
committed
fix: fix ci build workdir
1 parent 568bc6a commit 75d3e83

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

.github/workflows/frontend-ci-cd.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,31 +55,31 @@ jobs:
5555
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
5656
5757
- name: Install dependencies
58-
run: |
59-
cd ui
60-
pnpm install
58+
run: pnpm install
6159

6260
- name: Build frontend
6361
run: |
64-
cd ui
6562
echo "VITE_APP_VERSION=${{ steps.get_version.outputs.VERSION }}" >> .env.production
6663
pnpm run build
6764
6865
- name: 'Tar files'
69-
run: tar -cvf ui/dist.tar ui/dist
66+
run: tar -cvf dist.tar dist
7067

7168
- name: Upload build artifacts
7269
uses: actions/upload-artifact@v4
7370
with:
7471
name: frontend-build
75-
path: ui/dist.tar
72+
path: dist.tar
7673
if-no-files-found: error
7774
include-hidden-files: true
7875

7976
package:
8077
needs: build
8178
runs-on: ubuntu-latest
82-
if: github.event_name != 'pull_request'
79+
defaults:
80+
run:
81+
working-directory: ./ui
82+
# if: github.event_name != 'pull_request'
8383
steps:
8484
- name: Checkout code
8585
uses: actions/checkout@v4
@@ -97,8 +97,7 @@ jobs:
9797
run: |
9898
echo "Current directory: $(pwd)"
9999
echo "Listing dist directory:"
100-
ls -la ui
101-
ls -la ui/dist
100+
ls -la dist
102101
103102
- name: Set up QEMU
104103
uses: docker/setup-qemu-action@v3
@@ -116,8 +115,8 @@ jobs:
116115
- name: Package and push
117116
uses: docker/build-push-action@v5
118117
with:
119-
context: ./ui
120-
file: ./ui/.Dockerfile
118+
context: .
119+
file: .Dockerfile
121120
push: true
122121
platforms: linux/amd64, linux/arm64
123122
tags: |

0 commit comments

Comments
 (0)