From beadd6d19e4a10debfc9d9824f2f75f7503e1ac0 Mon Sep 17 00:00:00 2001 From: Jakub Kobeldys Date: Thu, 21 Sep 2023 16:06:12 +0200 Subject: [PATCH] Prod pipeline --- .../frontend-marketplace-deploy-mainnet.yml | 44 +++++++++++++++++++ ...> frontend-marketplace-deploy-testnet.yml} | 1 - frontend/marketplace/.env.prod | 16 +++---- 3 files changed, 52 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/frontend-marketplace-deploy-mainnet.yml rename .github/workflows/{frontend-marketplace-deploy.yml => frontend-marketplace-deploy-testnet.yml} (98%) diff --git a/.github/workflows/frontend-marketplace-deploy-mainnet.yml b/.github/workflows/frontend-marketplace-deploy-mainnet.yml new file mode 100644 index 000000000..23f26d113 --- /dev/null +++ b/.github/workflows/frontend-marketplace-deploy-mainnet.yml @@ -0,0 +1,44 @@ +name: "Deploy Marketplace Frontend - mainnet" + +on: + workflow_dispatch: + push: + paths: + - 'frontend/marketplace/**' + +jobs: + build: + name: Deploy Marketplace Frontend - mainnet + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - name: Load .env file + uses: xom9ikk/dotenv@v2 + with: + path: ./frontend/marketplace + mode: prod + - run: npm ci && npm run build + working-directory: ./frontend/marketplace + env: + VITE_API_ENDPOINT: ${{ env.VITE_API_ENDPOINT }} + VITE_HTTPS_FILE_URL: ${{ env.VITE_HTTPS_FILE_URL }} + VITE_MARKETPLACE_CONTRACT: ${{ env.VITE_MARKETPLACE_CONTRACT }} + VITE_CHAIN_ID: ${{ env.VITE_CHAIN_ID }} + VITE_CHAIN_NAME: ${{ env.VITE_CHAIN_NAME }} + VITE_RPC_ENDPOINT: ${{ env.VITE_RPC_ENDPOINT }} + VITE_REST_ENDPOINT: ${{ env.VITE_REST_ENDPOINT }} + VITE_DEFAULT_CREDIT_TYPE: ${{ env.VITE_DEFAULT_CREDIT_TYPE }} + VITE_ENVIRONMENT: ${{ env.VITE_ENVIRONMENT }} + VITE_GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }} + VITE_REVISION_ID: ${{ github.sha }} + VITE_ROLLBAR_ACCESS_TOKEN: ${{ secrets.MARKETPLACE_ROLLBAR_ACCESS_TOKEN }} + + + - uses: amondnet/vercel-action@v25 + with: + vercel-token: ${{ secrets.VERCEL_TOKEN }} + vercel-args: '--prod' + vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} + scope: ${{ secrets.VERCEL_ORG_ID }} + vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID_MARKETPLACE_MAINNET}} + working-directory: ./frontend/marketplace/ \ No newline at end of file diff --git a/.github/workflows/frontend-marketplace-deploy.yml b/.github/workflows/frontend-marketplace-deploy-testnet.yml similarity index 98% rename from .github/workflows/frontend-marketplace-deploy.yml rename to .github/workflows/frontend-marketplace-deploy-testnet.yml index 46db2cf47..8ec54198a 100644 --- a/.github/workflows/frontend-marketplace-deploy.yml +++ b/.github/workflows/frontend-marketplace-deploy-testnet.yml @@ -19,7 +19,6 @@ jobs: with: path: ./frontend/marketplace mode: test - load-mode: strict - run: npm ci && npm run build working-directory: ./frontend/marketplace env: diff --git a/frontend/marketplace/.env.prod b/frontend/marketplace/.env.prod index 2962bf2e0..456b702bb 100644 --- a/frontend/marketplace/.env.prod +++ b/frontend/marketplace/.env.prod @@ -1,9 +1,9 @@ -VITE_API_ENDPOINT="https://indexer.empowerchain.io:3000/" -VITE_HTTPS_FILE_URL="https://ipfs.empowerchain.io:8080/ipfs/" -VITE_MARKETPLACE_CONTRACT="empower14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sfg4umu" -VITE_CHAIN_ID="empowerchain-1" -VITE_CHAIN_NAME="Empowerchain" -VITE_RPC_ENDPOINT="https://rpc.empowerchain.io:26657" -VITE_REST_ENDPOINT="https://api.empowerchain.io:1317" -VITE_DEFAULT_CREDIT_TYPE="PCRD" +VITE_API_ENDPOINT=https://indexer.empowerchain.io:3000/ +VITE_HTTPS_FILE_URL=https://ipfs.empowerchain.io:8080/ipfs/ +VITE_MARKETPLACE_CONTRACT=empower14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sfg4umu +VITE_CHAIN_ID=empowerchain-1 +VITE_CHAIN_NAME=Empowerchain +VITE_RPC_ENDPOINT=https://rpc.empowerchain.io:26657 +VITE_REST_ENDPOINT=https://api.empowerchain.io:1317 +VITE_DEFAULT_CREDIT_TYPE=PCRD VITE_ENVIRONMENT=mainnet \ No newline at end of file