diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe59257..738ef40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 8738842..347d2de 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -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' \ No newline at end of file diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 7d31c92..87eca44 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -8,4 +8,4 @@ WORKDIR /app RUN yarn -CMD ["/bin/sh","-c","/app/start.sh"] \ No newline at end of file +ENTRYPOINT ["/bin/sh","-c","/app/start.sh"] \ No newline at end of file diff --git a/frontend/package.json b/frontend/package.json index 31b9af5..3c94c85 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -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", @@ -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" },