Skip to content

Commit e17c4dd

Browse files
authored
Merge pull request #19 from yokowu/main
fix: fix ci build workdir
2 parents 002f494 + b6b1960 commit e17c4dd

File tree

2 files changed

+28
-16
lines changed

2 files changed

+28
-16
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ jobs:
9393
- name: Build and push backend image
9494
uses: docker/build-push-action@v5
9595
with:
96-
context: .
97-
file: ./build/Dockerfile
96+
context: ./backend
97+
file: ./backend/build/Dockerfile
9898
push: true
9999
platforms: linux/amd64, linux/arm64
100100
tags: |

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

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ env:
2020
jobs:
2121
build:
2222
runs-on: ubuntu-latest
23-
defaults:
24-
run:
25-
working-directory: ./ui
2623
outputs:
2724
version: ${{ steps.get_version.outputs.VERSION }}
2825
steps:
@@ -55,21 +52,36 @@ jobs:
5552
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
5653
5754
- name: Install dependencies
58-
run: pnpm install
55+
run: |
56+
cd ui
57+
pnpm install
5958
6059
- name: Build frontend
6160
run: |
61+
cd ui
6262
echo "VITE_APP_VERSION=${{ steps.get_version.outputs.VERSION }}" >> .env.production
6363
pnpm run build
6464
6565
- name: 'Tar files'
66-
run: tar -cvf dist.tar dist
66+
run: tar -cvf ui/dist.tar ui/dist
67+
68+
- name: List files for debugging
69+
run: |
70+
echo "Current directory: $(pwd)"
71+
echo "Listing current directory:"
72+
ls -la
73+
echo "Listing dist directory:"
74+
ls -la ui/dist || echo "dist directory not found"
75+
echo "Checking if dist.tar exists:"
76+
ls -la ui/dist.tar || echo "dist.tar not found"
6777
6878
- name: Upload build artifacts
6979
uses: actions/upload-artifact@v4
7080
with:
7181
name: frontend-build
72-
path: ./ui/dist.tar
82+
path: ui/dist.tar
83+
if-no-files-found: error
84+
include-hidden-files: true
7385

7486
package:
7587
needs: build
@@ -84,15 +96,15 @@ jobs:
8496
with:
8597
name: frontend-build
8698

87-
- name: Extract files
88-
run: |
89-
tar -xvf dist.tar
90-
9199
- name: Check file structure
92100
run: |
93101
echo "Current directory: $(pwd)"
94-
echo "Listing dist directory:"
95-
ls -la dist
102+
echo "Listing current directory:"
103+
ls -la
104+
105+
- name: Extract files
106+
run: |
107+
tar -xvf dist.tar
96108
97109
- name: Set up QEMU
98110
uses: docker/setup-qemu-action@v3
@@ -110,8 +122,8 @@ jobs:
110122
- name: Package and push
111123
uses: docker/build-push-action@v5
112124
with:
113-
context: ./ui
114-
file: ./ui/.Dockerfile
125+
context: ui
126+
file: ui/.Dockerfile
115127
push: true
116128
platforms: linux/amd64, linux/arm64
117129
tags: |

0 commit comments

Comments
 (0)