-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/nb-rpc-uri-dashboard-build' into…
… feat/network-toggle
- Loading branch information
Showing
48 changed files
with
19,264 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Build prod WB dashboard | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "main" | ||
- "staging" | ||
paths: | ||
- ".github/workflows/build_prod_wb-dashboard.yml" | ||
- "webapps/world-builder-dashboard/**" | ||
|
||
jobs: | ||
build_prod_wb-dashboard: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository and main branch | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20.14.0" | ||
|
||
- name: Build frontend | ||
working-directory: ./webapps/world-builder-dashboard | ||
env: | ||
VITE_NB_JSON_RPC_URI: ${{ secrets.VITE_NB_JSON_RPC_URI }} | ||
VITE_NB_WB_DASHBOARD_ACCESS_ID: ${{ secrets.VITE_NB_WB_DASHBOARD_ACCESS_ID }} | ||
run: | | ||
npm install | ||
npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Manual Deploy branch WB dashboard | ||
|
||
on: | ||
workflow_dispatch: # Allow manual trigger | ||
inputs: | ||
branch: | ||
description: "Branch to deploy" | ||
required: true | ||
default: "staging" | ||
|
||
jobs: | ||
deploy_manual_branch_wb-dashboard: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Show branch name | ||
run: | | ||
echo "Running manual deployment for ${{ github.event.inputs.branch || github.event.pull_request.head.ref }} branch" | ||
- name: Checkout repository and main branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.inputs.branch || github.event.pull_request.head.ref }} | ||
|
||
- name: Set up node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20.14.0" | ||
|
||
- name: Install and build staging app | ||
working-directory: ./webapps/world-builder-dashboard | ||
env: | ||
VITE_NB_JSON_RPC_URI: ${{ secrets.VITE_NB_JSON_RPC_URI }} | ||
VITE_NB_WB_DASHBOARD_ACCESS_ID: ${{ secrets.VITE_NB_WB_DASHBOARD_ACCESS_ID }} | ||
VITE_BUILD_TARGET: ${{ github.event.inputs.branch || github.event.pull_request.head.ref }} | ||
run: | | ||
npm install | ||
npm run build | ||
- name: Update robots.txt, block alpha for crawlers | ||
working-directory: ./webapps/world-builder-dashboard/dist | ||
run: | | ||
sed -i "s/Disallow:.*/Disallow: \//" robots.txt | ||
- name: Upload static site to S3 bucket and invalidate CloudFront cache | ||
working-directory: ./webapps/world-builder-dashboard | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | ||
run: | | ||
aws s3 sync ./dist ${{ secrets.AWS_FRONTEND_BUCKET_WB_DASHBOARD_BRANCH }}/${{ github.event.inputs.branch || github.event.pull_request.head.ref }} --delete | ||
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DISTRIBUTION_ID_WB_DASHBOARD_BRANCH }} --paths '/${{ github.event.inputs.branch || github.event.pull_request.head.ref }}/*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Deploy prod WB dashboard | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- ".github/workflows/deploy_prod_wb-dashboard.yml" | ||
- "webapps/world-builder-dashboard/**" | ||
|
||
jobs: | ||
deploy_prod_wb-dashboard: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository and main branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: main | ||
|
||
- name: Set up node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20.14.0" | ||
|
||
- name: Install and build production app | ||
working-directory: ./webapps/world-builder-dashboard | ||
env: | ||
VITE_NB_JSON_RPC_URI: ${{ secrets.VITE_NB_JSON_RPC_URI }} | ||
VITE_NB_WB_DASHBOARD_ACCESS_ID: ${{ secrets.VITE_NB_WB_DASHBOARD_ACCESS_ID }} | ||
run: | | ||
npm install | ||
npm run build | ||
- name: Publish to CloudFlare Page | ||
uses: cloudflare/pages-action@v1 | ||
with: | ||
apiToken: ${{ secrets.CF_API_TOKEN_PROD }} | ||
accountId: ${{ secrets.CF_ACCOUNT_ID_PROD }} | ||
projectName: ${{ secrets.CF_PROJECT_NAME_WB_DASHBOARD_PROD }} | ||
directory: ./webapps/world-builder-dashboard/dist | ||
gitHubToken: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Deploy staging WB dashboard | ||
|
||
on: | ||
push: | ||
branches: | ||
- staging | ||
paths: | ||
- ".github/workflows/deploy_staging_wb-dashboard.yml" | ||
- "webapps/world-builder-dashboard/**" | ||
|
||
jobs: | ||
deploy_staging_wb-dashboard: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository and main branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: staging | ||
|
||
- name: Set up node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20.14.0" | ||
|
||
- name: Install and build staging app | ||
working-directory: ./webapps/world-builder-dashboard | ||
env: | ||
VITE_NB_JSON_RPC_URI: ${{ secrets.VITE_NB_JSON_RPC_URI }} | ||
VITE_NB_WB_DASHBOARD_ACCESS_ID: ${{ secrets.VITE_NB_WB_DASHBOARD_ACCESS_ID }} | ||
VITE_BUILD_TARGET: staging | ||
run: | | ||
npm install | ||
npm run build | ||
- name: Update robots.txt, block alpha for crawlers | ||
working-directory: ./webapps/world-builder-dashboard/dist | ||
run: | | ||
sed -i "s/Disallow:.*/Disallow: \//" robots.txt | ||
- name: Publish to CloudFlare Page | ||
uses: cloudflare/pages-action@v1 | ||
with: | ||
apiToken: ${{ secrets.CF_API_TOKEN_STAGE }} | ||
accountId: ${{ secrets.CF_ACCOUNT_ID_STAGE }} | ||
projectName: ${{ secrets.CF_PROJECT_NAME_WB_DASHBOARD_STAGE }} | ||
directory: ./webapps/world-builder-dashboard/dist | ||
gitHubToken: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[submodule "web3/lib/forge-std"] | ||
path = web3/lib/forge-std | ||
url = https://github.com/foundry-rs/forge-std | ||
[submodule "web3/contracts/utils/diamonds"] | ||
path = web3/contracts/utils/diamonds | ||
url = https://github.com/mudgen/diamond-3-hardhat |
Oops, something went wrong.