Skip to content

feat: show contract balance to admin if less than 2 NEAR (#973) #165

feat: show contract balance to admin if less than 2 NEAR (#973)

feat: show contract balance to admin if less than 2 NEAR (#973) #165

name: Deploy Widgets to Mainnet - Devhub
on:
push:
branches: [main]
jobs:
deploy-widgets:
runs-on: ubuntu-latest
name: Deploy
environment: devhub.near
defaults:
run:
working-directory: ./instances/devhub.near
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set replacements
id: set_replacements
run: |
jq '.REPL_POSTHOG_API_KEY = "${{ secrets.POSTHOG_API_KEY }}"' aliases.mainnet.json > temp.aliases.mainnet.json && mv temp.aliases.mainnet.json aliases.mainnet.json
echo "replacements=$(jq -r '[to_entries[] | .["find"] = "${" + .key + "}" | .["replace"] = .value | del(.key, .value)]' aliases.mainnet.json | tr -d "\n\r")" >> $GITHUB_OUTPUT
- name: Replace placeholders
uses: flcdrg/replace-multiple-action@v1
with:
files: "**/*.jsx"
find: "${{ steps.set_replacements.outputs.replacements }}"
prefix: "(^|.*)"
suffix: "($|.*)"
- name: Install dependencies
run: |
npm ci
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/bos-cli-rs/bos-cli-rs/releases/download/v0.3.15/bos-cli-installer.sh | sh
- name: Deploy widgets
run: |
bos components deploy '${{ vars.NEAR_SOCIAL_ACCOUNT_ID }}' sign-as '${{ vars.NEAR_SOCIAL_ACCOUNT_ID }}' network-config mainnet sign-with-plaintext-private-key --signer-public-key '${{ vars.NEAR_SOCIAL_ACCOUNT_PUBLIC_KEY }}' --signer-private-key '${{ secrets.NEAR_SOCIAL_ACCOUNT_PRIVATE_KEY }}' send