Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Frontend] update workflow and package mgr for monorepo config #2069

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/manual-deploy-ten-bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
location: "uksouth"
restart-policy: "Never"
environment-variables: NEXT_PUBLIC_BRIDGE_API_HOST=https://${{ github.event.inputs.testnet_type }}.ten.xyz/v1 NEXT_PUBLIC_FE_VERSION=${{ GITHUB.RUN_NUMBER }}-${{ GITHUB.SHA }}
command-line: npm run start-prod
command-line: pnpm run start-prod
ports: "80"
cpu: 2
memory: 2
11 changes: 6 additions & 5 deletions .github/workflows/manual-deploy-ten-gateway-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# If we are deploying to a non primary instance all those variables should be prefixed with the instance name
# example: dexynth-GATEWAY_URL

name: '[M] Deploy Ten Gateway Frontend'
run-name: '[M] Deploy Ten Gateway Frontend ( ${{ github.event.inputs.testnet_type }} )'
name: "[M] Deploy Ten Gateway Frontend"
run-name: "[M] Deploy Ten Gateway Frontend ( ${{ github.event.inputs.testnet_type }} )"
on:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -119,17 +119,18 @@ jobs:
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: 'Build and Push Docker Image'
- name: "Build and Push Docker Image"
run: |
DOCKER_BUILDKIT=1 docker build \
--build-arg NEXT_PUBLIC_API_HOST_ENVIRONMENT=${{ github.event.inputs.testnet_type }} \
--build-arg NEXT_PUBLIC_NETWORK_NAME=${{ env.NETWORK_NAME }} \
--build-arg NEXT_PUBLIC_TENSCAN_URL=${{ env.TENSCAN_URL }} \
--build-arg NEXT_PUBLIC_GATEWAY_URL=${{ env.GATEWAY_URL }} \
-t ${{ env.DOCKER_BUILD_TAG_GATEWAY_FE }} \
-f ./tools/walletextension/frontend/Dockerfile .
docker push ${{ env.DOCKER_BUILD_TAG_GATEWAY_FE }}

- name: 'Deploy Gateway FE to Azure Container Instances'
- name: "Deploy Gateway FE to Azure Container Instances"
uses: "azure/aci-deploy@v1"
with:
resource-group: ${{ secrets.RESOURCE_GROUP }}
Expand All @@ -140,4 +141,4 @@ jobs:
restart-policy: "Never"
ports: "80"
cpu: 2
memory: 2
memory: 2
4 changes: 2 additions & 2 deletions .github/workflows/manual-deploy-ten-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ jobs:
name: ${{ github.event.inputs.testnet_type }}-fe-ten-scan
location: "uksouth"
restart-policy: "Never"
environment-variables: NEXT_PUBLIC_API_HOST=https://${{ github.event.inputs.testnet_type }}-api.tenscan.io NEXT_PUBLIC_FE_VERSION=${{ GITHUB.RUN_NUMBER }}-${{ GITHUB.SHA }}
command-line: npm run start-prod
environment-variables: NEXT_PUBLIC_API_HOST=https://${{ github.event.inputs.testnet_type }}-api.tenscan.io NEXT_PUBLIC_FE_VERSION=${{ GITHUB.RUN_NUMBER }}-${{ GITHUB.SHA }} NEXT_PUBLIC_API_HOST_ENVIRONMENT=${{ github.event.inputs.testnet_type }}
command-line: pnpm run start-prod
ports: "80"
cpu: 2
memory: 2
Expand Down
4 changes: 2 additions & 2 deletions tools/bridge-frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ ARG GOOGLE_ANALYTICS_ID

# ENV for URL to be used in the app
ENV NEXT_PUBLIC_BRIDGE_API_HOST=${API_HOST}
ENV NEXT_PUBLIC_BRIDGE_API_HOST_ENVIRONMENT=${API_HOST_ENVIRONMENT}
ENV NEXT_PUBLIC_API_HOST_ENVIRONMENT=${API_HOST_ENVIRONMENT}
ENV NEXT_PUBLIC_BRIDGE_GOOGLE_ANALYTICS_ID=${GOOGLE_ANALYTICS_ID}

RUN npm install
RUN pnpm install

EXPOSE 80
4 changes: 2 additions & 2 deletions tools/bridge-frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ For more information on the TEN bridge, please refer to the [TEN Bridge Document

2. **Install Dependencies:**
```bash
npm install
pnpm install
```

3. **Run the Development Server:**
```bash
npm run dev
pnpm run dev
```

The application will be accessible at [http://localhost:3000](http://localhost:3000).
Expand Down
7 changes: 2 additions & 5 deletions tools/bridge-frontend/env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
NEXT_PUBLIC_BRIDGE_API_HOST=

NEXT_PUBLIC_BRIDGE_L1=
NEXT_PUBLIC_BRIDGE_L2=
NEXT_PUBLIC_BRIDGE_MESSAGE_BUS=
NEXT_PUBLIC_BRIDGE_GOOGLE_ANALYTICS_ID=
NEXT_PUBLIC_BRIDGE_GOOGLE_ANALYTICS_ID=
NEXT_PUBLIC_API_HOST_ENVIRONMENT=
Loading
Loading