Skip to content

Commit

Permalink
Merge pull request #54 from XinFinOrg/fix-fe-img
Browse files Browse the repository at this point in the history
Fix fe img
  • Loading branch information
wjrjerome authored Sep 8, 2023
2 parents 4dc7747 + 326567b commit c34ab87
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 23 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,8 @@ jobs:
- name: Docker build and tag image
run: docker build . --file Dockerfile --tag ${{ steps.image.outputs.name }}

- name: Install dependencies #test after docker build to not pollute image with files
run: yarn
# env:
# NODE_ENV: production

- name: Test build
run: yarn run build

- name: Test serve
run: yarn global add serve
- name: Test run docker
run: docker run --entrypoint /bin/sh ${{ steps.image.outputs.name }} -c 'yarn run build && yarn global add serve'

- name: Docker push
run: docker push ${{ steps.image.outputs.name }}
21 changes: 9 additions & 12 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,14 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Install dependencies
run: yarn
env:
NODE_ENV: production

- name: Test build
run: yarn run build
env:
NODE_ENV: production
- name: Determine Docker Image Name
id: image
run: |
echo "name=subnet-frontend:pr" >> $GITHUB_OUTPUT
- name: Docker build and tag image
run: docker build . --file Dockerfile --tag ${{ steps.image.outputs.name }}

- name: Test serve
run: yarn global add serve
env:
NODE_ENV: production
- name: Test run docker
run: docker run --entrypoint /bin/sh ${{ steps.image.outputs.name }} -c 'yarn run build && yarn global add serve'
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ WORKDIR /app

RUN yarn

CMD ["/bin/sh","-c","/app/start.sh"]
ENTRYPOINT ["/bin/sh","-c","/app/start.sh"]
6 changes: 6 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"dependencies": {
"@radix-ui/react-tooltip": "^1.0.6",
"@rainbow-me/rainbowkit": "^1.0.9",
"@vitejs/plugin-react": "^4.0.0",
"autoprefixer": "^10.4.14",
"axios": "^1.4.0",
"bignumber.js": "^9.1.1",
"daisyui": "^3.6.1",
Expand All @@ -22,7 +24,11 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.14.0",
"tailwind-merge": "^1.13.2",
"viem": "^1.7.0",
"vite": "^4.4.7",
"vite-plugin-node-polyfills": "^0.9.0",
"vite-tsconfig-paths": "^4.2.0",
"wagmi": "^1.3.10",
"yup": "^1.2.0"
},
Expand Down

0 comments on commit c34ab87

Please sign in to comment.