Skip to content

pre-stage to stage #4589

pre-stage to stage

pre-stage to stage #4589

Workflow file for this run

name: Build & deploy
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
env:
STAGE_SSV_NETWORKS: >
[
{
\"networkId\": 17000,
\"apiVersion\": \"v4\",
\"apiNetwork\": \"holesky\",
\"api\": \"https://api.stage.ssv.network/api\",
\"explorerUrl\": \"https://holesky-explorer.stage.ssv.network\",
\"insufficientBalanceUrl\": \"https://faucet.stage.ssv.network\",
\"googleTagSecret\": \"${{ secrets.STAGE_GOOGLE_TAG_SECRET }}\",
\"tokenAddress\": \"0x68A8DDD7a59A900E0657e9f8bbE02B70c947f25F\",
\"setterContractAddress\": \"${{ secrets.STAGE_HOLESKY_NETWORK_SETTER_CONTRACT_ADDRESS_V4 }}\",
\"getterContractAddress\": \"${{ secrets.STAGE_HOLESKY_NETWORK_GETTER_CONTRACT_ADDRESS_V4 }}\"
}
]
PROD_SSV_NETWORKS: >
[
{
\"networkId\": 1,
\"apiVersion\": \"v4\",
\"apiNetwork\": \"mainnet\",
\"api\": \"https://api.ssv.network/api\",
\"explorerUrl\": \"https://explorer.ssv.network\",
\"insufficientBalanceUrl\": \"https://coinmarketcap.com/currencies/ssv-network/#Markets\",
\"googleTagSecret\": \"${{ secrets.PROD_GOOGLE_TAG_SECRET }}\",
\"distributionContract\": \"${{ secrets.PROD_DISTRIBUTION_CONTRACT_ADDRESS_MAINNET }}\",
\"tokenAddress\": \"0x9D65fF81a3c488d585bBfb0Bfe3c7707c7917f54\",
\"setterContractAddress\": \"${{ secrets.PROD_NETWORK_SETTER_CONTRACT_ADDRESS_V4_MAINNET }}\",
\"getterContractAddress\": \"${{ secrets.PROD_NETWORK_GETTER_CONTRACT_ADDRESS_V4_MAINNET }}\"
},
{
\"networkId\": 17000,
\"apiVersion\": \"v4\",
\"apiNetwork\": \"holesky\",
\"api\": \"https://api.ssv.network/api\",
\"explorerUrl\": \"https://holesky.explorer.ssv.network\",
\"insufficientBalanceUrl\": \"https://faucet.ssv.network\",
\"googleTagSecret\": \"${{ secrets.PROD_GOOGLE_TAG_SECRET }}\",
\"tokenAddress\": \"0xad45A78180961079BFaeEe349704F411dfF947C6\",
\"setterContractAddress\": \"${{ secrets.PROD_HOLESKY_NETWORK_SETTER_CONTRACT_ADDRESS_V4 }}\",
\"getterContractAddress\": \"${{ secrets.PROD_HOLESKY_NETWORK_GETTER_CONTRACT_ADDRESS_V4 }}\"
}
]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
node-version: 20.12.2
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install packages
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install
- name: Run lint
run: yarn lint
# <app.stage.ssv.network>
- name: Run stage webapp build
if: github.ref == 'refs/heads/stage'
run: >
GAS_PRICE="${{ env.GAS_PRICE }}"
GAS_LIMIT="${{ env.GAS_LIMIT }}"
SSV_NETWORKS="${{ env.STAGE_SSV_NETWORKS }}"
BLOCKNATIVE_KEY="$BLOCKNATIVE_KEY"
LINK_SSV_DEV_DOCS="$LINK_SSV_DEV_DOCS"
BLOX_INFRA_API="$BLOX_INFRA_API"
yarn build
env:
GAS_PRICE: ${{ secrets.GAS_PRICE }}
GAS_LIMIT: ${{ secrets.GAS_LIMIT }}
BLOCKNATIVE_KEY: ${{ secrets.BLOCKNATIVE_KEY }}
LINK_SSV_DEV_DOCS: ${{ secrets.LINK_SSV_DEV_DOCS }}
BLOX_INFRA_API: "https://api.bloxstaking.com"
- name: Deploy stage webapp
if: github.ref == 'refs/heads/stage'
uses: jakejarvis/s3-sync-action@v0.5.0
with:
args: --acl public-read --follow-symlinks --delete
env:
SOURCE_DIR: 'build/'
AWS_REGION: 'us-west-2'
AWS_S3_BUCKET: ${{ secrets.STAGE_AWS_S3_BUCKET_V4 }}
AWS_ACCESS_KEY_ID: ${{ secrets.STAGE_AWS_SECRET_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGE_AWS_SECRET_ACCESS_KEY }}
# </app.stage.ssv.network>
# <beta.app.ssv.network>
- name: Run prod webapp build
if: github.ref == 'refs/heads/main'
run: >
GAS_PRICE="${{ env.GAS_PRICE }}"
GAS_LIMIT="${{ env.GAS_LIMIT }}"
SSV_NETWORKS="${{ env.PROD_SSV_NETWORKS }}"
BLOCKNATIVE_KEY="$BLOCKNATIVE_KEY"
LINK_SSV_DEV_DOCS="$LINK_SSV_DEV_DOCS"
BLOX_INFRA_API="$BLOX_INFRA_API"
yarn build
env:
GAS_PRICE: ${{ secrets.GAS_PRICE }}
GAS_LIMIT: ${{ secrets.GAS_LIMIT }}
BLOCKNATIVE_KEY: ${{ secrets.BLOCKNATIVE_KEY }}
LINK_SSV_DEV_DOCS: ${{ secrets.LINK_SSV_DEV_DOCS }}
BLOX_INFRA_API: "https://api.bloxstaking.com"
- name: Deploy prod webapp
if: github.ref == 'refs/heads/main'
uses: jakejarvis/s3-sync-action@v0.5.0
with:
args: --acl public-read --follow-symlinks --delete
env:
SOURCE_DIR: 'build/'
AWS_REGION: 'us-west-2'
AWS_S3_BUCKET: ${{ secrets.PROD_AWS_S3_BUCKET_V4 }}
AWS_ACCESS_KEY_ID: ${{ secrets.PROD_AWS_SECRET_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }}
# </beta.app.ssv.network>
# <faucet.stage.ssv.network>
# - name: Run stage faucet build
# if: github.ref == 'refs/heads/stage'
# run: >
# SSV_NETWORKS="${{ env.STAGE_SSV_NETWORKS }}"
# GOOGLE_TAG_SECRET="$GOOGLE_TAG_SECRET"
# EXPLORER_URL="$EXPLORER_URL" BLOCKNATIVE_KEY="$BLOCKNATIVE_KEY" yarn build
# env:
# VITE_FAUCET_PAGE: "true"
# SSV_NETWORKS: ${{ env.STAGE_SSV_NETWORKS }}
# BLOCKNATIVE_KEY: ${{ secrets.BLOCKNATIVE_KEY }}
# EXPLORER_URL: "https://explorer.ssv.network/"
# LINK_SSV_DEV_DOCS: ${{ secrets.LINK_SSV_DEV_DOCS }}
# VITE_CAPTCHA_KEY: ${{ secrets.CAPTCHA_KEY_STAGE }}
#
# - name: Deploy stage faucet
# if: github.ref == 'refs/heads/stage'
# uses: jakejarvis/s3-sync-action@v0.5.0
# with:
# args: --acl public-read --follow-symlinks --delete
# env:
# SOURCE_DIR: 'build/'
# AWS_REGION: 'us-west-2'
# AWS_S3_BUCKET: ${{ secrets.STAGE_FAUCET_AWS_S3_BUCKET }}
# AWS_ACCESS_KEY_ID: ${{ secrets.STAGE_AWS_SECRET_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGE_AWS_SECRET_ACCESS_KEY }}
# </faucet.stage.ssv.network>
# <claim.stage.ssv.network>
# - name: Run stage build claim
# if: github.ref == 'refs/heads/stage'
# run: >
# SSV_NETWORKS="${{ env.STAGE_SSV_NETWORKS }}"
# BLOCKNATIVE_KEY="$BLOCKNATIVE_KEY" PROD_CLAIM_PAGE="$PROD_CLAIM_PAGE" yarn build
# env:
# PROD_CLAIM_PAGE: "true"
# BLOX_INFRA_API: 'https://api.bloxstaking.com'
# BLOCKNATIVE_KEY: ${{ secrets.BLOCKNATIVE_KEY }}
# LINK_SSV_DEV_DOCS: ${{ secrets.LINK_SSV_DEV_DOCS }}
# SSV_NETWORKS: ${{ env.STAGE_SSV_NETWORKS }}
#
# - name: Deploy stage claim
# if: github.ref == 'refs/heads/stage'
# uses: jakejarvis/s3-sync-action@v0.5.0
# with:
# args: --acl public-read --follow-symlinks --delete
# env:
# SOURCE_DIR: 'build/'
# AWS_REGION: 'us-west-2'
# AWS_S3_BUCKET: ${{ secrets.STAGE_V2_AWS_S3_BUCKET_CLAIM }}
# AWS_ACCESS_KEY_ID: ${{ secrets.STAGE_AWS_SECRET_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGE_AWS_SECRET_ACCESS_KEY }}
# </claim.stage.ssv.network>
# <faucet.ssv.network>
# - name: Run prod faucet build
# if: github.ref == 'refs/heads/main'
# run: >
# SSV_NETWORKS="${{ env.PROD_SSV_NETWORKS }}"
# GOOGLE_TAG_SECRET="$GOOGLE_TAG_SECRET"
# EXPLORER_URL="$EXPLORER_URL" BLOCKNATIVE_KEY="$BLOCKNATIVE_KEY" yarn build
# env:
# VITE_FAUCET_PAGE: "true"
# SSV_NETWORKS: ${{ env.PROD_SSV_NETWORKS }}
# BLOCKNATIVE_KEY: ${{ secrets.BLOCKNATIVE_KEY }}
# EXPLORER_URL: "https://explorer.ssv.network/"
# LINK_SSV_DEV_DOCS: ${{ secrets.LINK_SSV_DEV_DOCS }}
# VITE_CAPTCHA_KEY: ${{ secrets.CAPTCHA_KEY_STAGE }}
#
# - name: Deploy prod faucet
# if: github.ref == 'refs/heads/main'
# uses: jakejarvis/s3-sync-action@v0.5.0
# with:
# args: --acl public-read --follow-symlinks --delete
# env:
# SOURCE_DIR: 'build/'
# AWS_REGION: 'us-west-2'
# AWS_S3_BUCKET: ${{ secrets.PROD_FAUCET_AWS_S3_BUCKET }}
# AWS_ACCESS_KEY_ID: ${{ secrets.PROD_AWS_SECRET_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }}
# </faucet.ssv.network>
# <claim.ssv.network>
# - name: Run prod build claim
# if: github.ref == 'refs/heads/main'
# run: >
# SSV_NETWORKS="${{ env.PROD_SSV_NETWORKS }}"
# BLOCKNATIVE_KEY="$BLOCKNATIVE_KEY" PROD_CLAIM_PAGE="$PROD_CLAIM_PAGE" yarn build
# env:
# PROD_CLAIM_PAGE: "true"
# BLOX_INFRA_API: 'https://api.bloxstaking.com'
# BLOCKNATIVE_KEY: ${{ secrets.BLOCKNATIVE_KEY }}
# LINK_SSV_DEV_DOCS: ${{ secrets.LINK_SSV_DEV_DOCS }}
# SSV_NETWORKS: ${{ env.PROD_SSV_NETWORKS }}
#
# - name: Deploy prod claim
# if: github.ref == 'refs/heads/main'
# uses: jakejarvis/s3-sync-action@v0.5.0
# with:
# args: --acl public-read --follow-symlinks --delete
# env:
# SOURCE_DIR: 'build/'
# AWS_REGION: 'us-west-2'
# AWS_S3_BUCKET: ${{ secrets.PROD_AWS_S3_BUCKET_CLAIM }}
# AWS_ACCESS_KEY_ID: ${{ secrets.PROD_AWS_SECRET_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }}
# </claim.ssv.network>