chore: sync develop and master #11
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
name: EOS - Build and Deploy to Staging - MainNet | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
name: build-eos-mainnet-staging | |
environment: eosMainNet | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.HYPHA_AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.HYPHA_AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '16.x' | |
- run: yarn global add @vue/cli@latest | |
- run: yarn install | |
- run: mv public/chain-manifests-prod.json public/chain-manifests.json | |
- run: mv public/app-manifest-prod.json public/app-manifest.json | |
- run: yarn build | |
env: | |
APP_NAME: 'Hypha DHO - EOS' | |
NETWORK_CHAIN_ID: ${{ vars.NETWORK_CHAIN_ID }} | |
DAO_CONTRACT: 'dao.hypha' | |
HYPHA_CONTRACT: 'hypha.hypha' | |
SUPPLY_CONTRACT: 'voice.hypha' | |
MULTISIG_CONTRACT: 'msig.hypha' | |
KV_CONTRACT: 'kv.hypha' | |
PPP_ENV: ${{ vars.PPP_ENV }} | |
PPP_APP_ID: ${{ vars.PPP_APP_ID }} | |
ACCOUNT_API_URL: ${{ vars.ACCOUNT_API_URL }} | |
ACCOUNT_API_KEY: ${{ secrets.ACCOUNT_API_KEY }} | |
BLOCKCHAIN_ENDPOINTS: ${{ vars.BLOCKCHAIN_ENDPOINTS }} | |
BLOCKCHAIN_EXPLORER: ${{ vars.BLOCKCHAIN_EXPLORER }} | |
BLOCKCHAIN_EXPLORER_BTC: 'https://www.blockchain.com/btc/tx/' | |
BLOCKCHAIN_EXPLORER_ETH: 'https://etherscan.io/tx/' | |
BLOCKCHAIN_EXPLORER_EOS: 'https://bloks.io/transaction/' | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
DOCUMENTATION: ${{ vars.DOCUMENTATION }} | |
DGRAPH_URL: ${{ vars.DGRAPH_URL }} | |
DGRAPH_ROOT_HASH: ${{ vars.DGRAPH_ROOT_HASH }} | |
DGRAPH_AUTH_KEY: ${{ secrets.DGRAPH_AUTH_KEY }} | |
GRAPHQL_URI: ${{vars.GRAPHQL_URI}} | |
ROOT_DAO_ID: ${{vars.ROOT_DAO_ID}} | |
ROOT_DAO_SLUG: ${{vars.ROOT_DAO_SLUG}} | |
HEALTH_ENDPOINT: ${{ vars.HEALTH_ENDPOINT }} | |
ELASTIC_SEARCH_URL: ${{ vars.ELASTIC_SEARCH_URL }} | |
ELASTIC_SEARCH_API_KEY: ${{ secrets.ELASTIC_SEARCH_API_KEY }} | |
IPFS_URL: 'ipfs.infura.io' | |
IPFS_PROJECT_ID: '2F5pWHIOMgHji1DeqUT0mGpvySz' | |
IPFS_PROJECT_SECRET: ${{ secrets.IPFS_PROJECT_SECRET }} | |
IPFS_GATEWAY: 'https://hypha.infura-ipfs.io/ipfs/' | |
HYPHA_TOKEN_SALES_ENCODE_KEY: ${{ secrets.HYPHA_TOKEN_SALES_ENCODE_KEY }} | |
HYPHA_TOKEN_SALES_URL: ${{ vars.HYPHA_TOKEN_SALES_URL }} | |
HYPHA_TOKEN_SALES_API_URL: 'http://api-tokensale.hypha.earth' | |
HYPHA_TOKEN_SALES_RPC_URL: 'https://mainnet.telos.net' | |
CAPTCHA_PUBLIC_KEY: ${{ vars.CAPTCHA_PUBLIC_KEY }} | |
CAPTCHA_HOST: ${{ vars.CAPTCHA_HOST }} | |
CAPTCHA_NETWORK: ${{ vars.CAPTCHA_NETWORK }} | |
LOGIN_CONTRACT: ${{ vars.LOGIN_CONTRACT }} | |
JOIN_CONTRACT: ${{ vars.JOIN_CONTRACT }} | |
JOIN_URI: 'https://join.hypha.earth/' | |
DOWNLOAD_WALLET_LINK_IOS: ${{vars.DOWNLOAD_WALLET_LINK_IOS}} || http://itunes.apple.com/lb/app/id1659926348 | |
DOWNLOAD_WALLET_LINK_ANDROID: ${{vars.DOWNLOAD_WALLET_LINK_ANDROID}} || http://play.google.com/store/apps/details?id=earth.hypha.wallet.hypha_wallet | |
- name: Deploy to S3 bucket | |
run: aws s3 sync ./dist/spa s3://${{ vars.AWS_S3_BUCKET_STAGING}} --delete | |
- name: Invalidate CloudFront | |
uses: chetan/invalidate-cloudfront-action@v2 | |
env: | |
DISTRIBUTION: ${{ vars.DISTRIBUTION_ID_STAGING}} | |
PATHS: '/*' | |
AWS_ACCESS_KEY_ID: ${{ secrets.HYPHA_AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.HYPHA_AWS_SECRET_ACCESS_KEY }} |