Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deploy script #32

Merged
merged 3 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions .github/workflows/deploy-prod-mainnet.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
name: Deploy Components to Mainnet
on:
pull_request:
push:
branches: [main]
jobs:
deploy-mainnet:
uses: NEARBuilders/bos-workspace/.github/workflows/deploy.yml@main
with:
bw-legacy: false
deploy-env: "mainnet"
app-name: "[APP_NAME]"
deploy-account-address: "[DEPLOY_ACCOUNT]"
signer-account-address: "[SIGNER_ACCOUNT]"
signer-public-key: [PUBLIC_KEY]
secrets:
SIGNER_PRIVATE_KEY: ${{ secrets.SIGNER_PRIVATE_KEY }}
name: Deploy components to social.near (mainnet)
runs-on: ubuntu-latest
environment: treasury-devdao.near
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Deploy widgets
run: |
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
echo "on branch $BRANCH"
if [[ "$BRANCH" != "main" ]]; then
echo "Not on main branch, dry run by diff with treasury-devdao.near"
npm run dry-run:treasury
else
npm run deploy:treasury -- '${{ 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
fi
1 change: 1 addition & 0 deletions instances/treasury-devdao.near/src
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
"build": "npm run fmt",
"prepare": "husky install",
"bw:dev:treasury": "bw dev instances/treasury-devdao.near",
"bw:build:treasury": "bw build instances/treasury-devdao.near",
"bw:build:treasury": "bw build instances/treasury-devdao.near build/treasury-devdao.near && mv build/treasury-devdao.near/src/widget/* build/treasury-devdao.near/src/ && rm -Rf build/treasury-devdao.near/src/widget",
"gateway:treasury": "node scripts/dev-gateway.js treasury-devdao.near",
"deploy:treasury": "npm run bw:build:treasury && cd ./build/treasury-devdao.near && bos components deploy",
"dry-run:treasury": "npm run bw:build:treasury && cd ./build/treasury-devdao.near && bos components diff treasury-devdao.near network-config mainnet",
"test": "npx playwright test",
"test:watch:codespaces": "npm test -- --ui-host=0.0.0.0"
},
Expand Down Expand Up @@ -58,7 +60,7 @@
"typescript",
"starter"
],
"author": "devhub.near",
"author": "treasury-devdao.near",
"license": "MIT",
"bugs": {
"url": "https://github.com/NEAR-DevHub/neardevhub-treasury-dashboard.git"
Expand Down
Loading