Skip to content

Commit

Permalink
Merge pull request #2069 from ten-protocol/jennifer/3948-create-workf…
Browse files Browse the repository at this point in the history
…low-to-test-monorepo-changes

[Frontend] update workflow and package mgr for monorepo config
  • Loading branch information
Jennievon authored Oct 1, 2024
2 parents 9888300 + f33cc62 commit e86c051
Show file tree
Hide file tree
Showing 20 changed files with 19,418 additions and 44,440 deletions.
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

0 comments on commit e86c051

Please sign in to comment.