Skip to content

Commit

Permalink
Merge pull request #21 from PotLock/deployment-script
Browse files Browse the repository at this point in the history
Added deployment and dry-run script
  • Loading branch information
Megha-Dev-19 authored Aug 20, 2024
2 parents eb26456 + 258d448 commit ff1b680
Show file tree
Hide file tree
Showing 4 changed files with 1,199 additions and 1,215 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/deploy-bos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Deploy Widgets to Mainnet - AIPGF
on:
push:
branches: [main]
jobs:
deploy-widgets:
runs-on: ubuntu-latest
name: Deploy
environment: bos.forum.potlock.near
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install dependencies
run: |
yarn install --frozen-lockfile
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: |
npm run bos: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
22 changes: 22 additions & 0 deletions .github/workflows/dry-run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Dry-run

on:
pull_request:
branches: [main]

jobs:
deploy-widgets:
name: Diff from PR
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install dependencies
run: |
yarn install --frozen-lockfile
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: Dry-run widgets
run: |
npm run bos:dry-run
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
"clean": "rimraf dist",
"generateimportmap": "(cd public && jspm link index.html -o index.html)",
"web4:deploy": "NEAR_ENV=mainnet npx web4-deploy dist psalomobos.near --nearfs",
"bos:dry-run": "bw build && cd ./build && bos components diff bos.forum.potlock.near network-config mainnet",
"bos:deploy": "bw build && cd ./build && bos components deploy",
"test": "npx playwright test",
"test:ui": "npx playwright test --ui",
"test:ui:codespaces": "npx playwright test --ui-host=0.0.0.0",
Expand Down Expand Up @@ -77,7 +79,7 @@
"@babel/preset-react": "^7.14.5",
"assert": "^2.0.0",
"babel-loader": "^8.2.2",
"bos-workspace": "^1.0.0-alpha.21",
"bos-workspace": "^1.0.0-alpha.37",
"browserify-zlib": "^0.2.0",
"buffer": "^6.0.3",
"clean-webpack-plugin": "^4.0.0",
Expand Down
Loading

0 comments on commit ff1b680

Please sign in to comment.