Skip to content

delete all devhub components and redeploy (not to be merged) #92

delete all devhub components and redeploy (not to be merged)

delete all devhub components and redeploy (not to be merged) #92

name: Deploy Widgets to Mainnet - Devhub
on:
pull_request:
push:
branches: [main]
jobs:
deploy-widgets:
runs-on: ubuntu-latest
name: Deploy ( or diff from PR ) - Devhub
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: |
echo "replacements=$(jq -r '[to_entries[] | .["find"] = "${" + .key + "}" | .["replace"] = .value | del(.key, .value), {"find": "${REPL_POSTHOG_API_KEY}", "replace": "'${{ secrets.POSTHOG_API_KEY }}'"}]' 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/FroVolod/bos-cli-rs/releases/download/v0.3.6/bos-cli-installer.sh | sh
- 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 devhub.near"
npm run dry-run:devhub
else
bos components delete devhub.near selected devhub.components.templates.AppLayout,devhub.entity.addon.blog.editor.form,devhub.entity.addon.blog.editor.layout,devhub.components.atom.Icon,devhub.components.island.home-section,devhub.components.molecule.BadgesList,devhub.entity.addon.github.Viewer,devhub.entity.community.configuration.AddonsConfigurator,devhub.page.communities,devhub.page.contribute,devhub.components.island.banner,devhub.page.addon,devhub.entity.addon.wiki.Configurator,devhub.components.molecule.NavbarDropdown,devhub.page.post,devhub.entity.addon.blog.editor.preview,devhub.entity.addon.blog.Card,devhub.entity.community.configuration.BrandingConfigurator,devhub.entity.post.History,devhub.entity.post.PostEditor sign-as devhub.near network-config mainnet
bos components delete devhub.near selected devhub.entity.post.Panel,devhub.components.island.support,devhub.entity.addon.blog.Configurator,devhub.entity.addon.wiki.Viewer,devhub.components.molecule.MarkdownEditor,devhub.entity.post.Post,devhub.entity.addon.kanban.Viewer,devhub.components.atom.Toggle,devhub.entity.post.List,devhub.feature.post-search.panel,devhub.entity.community.Card,devhub.entity.community.Spawner,devhub.entity.addon.kanban.Configurator,devhub.entity.addon.blog.Viewer,devhub.entity.addon.github.Configurator,devhub.entity.community.configuration.AccessControlConfigurator,devhub.entity.community.configuration.AboutConfigurator,devhub.entity.community.configuration.ConfigurationSection,devhub.components.molecule.MarkdownViewer,app sign-as devhub.near network-config mainnet
bos components delete devhub.near selected devhub.components.organism.Configurator,devhub.components.molecule.Button,devhub.entity.community.Activity,devhub.entity.addon.blog.editor.provider,devhub.page.create,devhub.page.blog,devhub.components.molecule.PostControls,core.adapter.devhub-contract,devhub.entity.addon.blog.Page,devhub.page.feed,devhub.entity.addon.telegram.Configurator,devhub.components.island.explore,devhub.page.community.index,devhub.components.island.participate,devhub.entity.addon.blog.editor.index,devhub.feature.post-search.by-author,devhub.entity.community.Sidebar,core.lib.url,core.lib.struct,devhub.components.organism.Navbar sign-as devhub.near network-config mainnet
bos components delete devhub.near selected devhub.components.island.connect,devhub.entity.addon.telegram.Viewer,devhub.components.molecule.ProfileCard,devhub.entity.community.Provider,devhub.feature.post-search.by-tag,devhub.components.atom.Tag,devhub.page.about,devhub.page.community.configuration,devhub.entity.community.Teams,devhub.page.profile,devhub.components.molecule.Input,devhub.entity.post.Postv2,devhub.entity.community.configuration.InformationConfigurator,devhub.entity.addon.blog.Feed,devhub.entity.addon.blog.editor.sidebar,devhub.page.home,devhub.components.molecule.Select,devhub.components.island.hero,devhub.entity.addon.blog.editor.content,devhub.entity.community.Tile sign-as devhub.near network-config mainnet
bos components delete devhub.near selected devhub.components.molecule.Tile,devhub.components.organism.NewsLetter,devhub.entity.post.draft,devhub.components.molecule.SimpleMDE,devhub.components.molecule.AccountAutocomplete,devhub.components.molecule.Switch,devhub.components.layout.LikeButton.Faces,devhub.entity.team.LabelPermissions,devhub.page.admin.homepageTab,devhub.components.molecule.ListEditor,devhub.components.atom.Alert,devhub.page.admin.moderatorsTab,devhub.page.admin.restrictedLabelsTab,devhub.entity.team.LabelRow,devhub.entity.team.Configurator,devhub.page.admin.index,DevGov.Notification.Item.Right,DevGov.Notification.Item.Left,devhub.components.molecule.BadgeDetails,devhub.components.molecule.ProfileLine sign-as devhub.near network-config mainnet
bos components delete devhub.near selected devhub.components.molecule.CommunityControl,core.lib.stringUtils,core.lib.autocomplete,devhub.entity.addon.kanban.post_ticket,core.lib.uuid,devhub.entity.addon.github.kanban_ticket,devhub.entity.addon.github.kanban_board,devhub.entity.addon.kanban.post_board,core.lib.data-request,core.lib.common,devhub.entity.community.Announcements,devhub.components.organism.Feed,devhub.components.organism.Feed.NearQueryApi,devhub.entity.community.Compose,devhub.entity.community.Discussions,devhub.entity.proposal.Editor,devhub.entity.proposal.ComposeComment,devhub.feature.proposal-search.by-category,devhub.entity.proposal.AccountInput,devhub.feature.proposal-search.by-stage sign-as devhub.near network-config mainnet
bos components delete devhub.near selected devhub.entity.proposal.Comments,devhub.feature.proposal-search.by-input,devhub.components.molecule.Compose,devhub.entity.proposal.CommentIcon,devhub.components.molecule.Spinner,devhub.feature.proposal-search.by-sort,devhub.entity.proposal.LikeButton,devhub.page.proposals,devhub.entity.proposal.CategoryTag,devhub.entity.proposal.Feed,devhub.entity.proposal.StatusTag,devhub.components.molecule.DropDown,devhub.entity.proposal.ConfirmReviewModal,devhub.entity.proposal.CategoryDropdown,devhub.entity.proposal.Proposal,devhub.feature.proposal-search.by-author,devhub.entity.proposal.Profile,devhub.entity.proposal.ConfirmCancelModal,devhub.entity.proposal.History,devhub.entity.proposal.LoginScreen sign-as devhub.near network-config mainnet
bos components delete devhub.near selected devhub.components.molecule.DropDownWithSearch,devhub.notification.Item,devhub.notification.LR,devhub.entity.proposal.CommentsAndLogs,devhub.notification.Right,devhub.notification.Left,devhub.entity.proposal.VerificationStatus,devhub.components.feed.SubscribedFeed,devhub.entity.proposal.LinkedProposalsDropdown,devhub.components.feed.MergedIndexFeed,devhub.page.announcements,devhub.components.molecule.Checkbox,devhub.entity.addon.blogv2.Viewer,devhub.entity.addon.blogv2.Configurator,devhub.entity.addon.blogv2.editor.ConfirmModal,devhub.page.blogv2,devhub.entity.addon.blogv2.editor.provider,devhub.entity.addon.blogv2.editor.layout,devhub.entity.addon.blogv2.Card,devhub.entity.addon.blogv2.editor.form sign-as devhub.near network-config mainnet
bos components delete devhub.near selected devhub.entity.addon.blogv2.editor.BlogOverview,devhub.entity.addon.blogv2.editor.BlogPostSettings,devhub.entity.addon.blogv2.editor.content,devhub.entity.addon.blogv2.Blog,devhub.entity.addon.blogv2.Page,devhub.entity.addon.blogv2.editor.CategoryDropdown,devhub.components.molecule.BlogControl,devhub.entity.addon.blogv2.editor.index,devhub.page.admin.AccountsEditor,devhub.components.molecule.ShareButton,devhub.components.molecule.ShareLinkButton,devhub.entity.proposal.AcceptedTerms,devhub.entity.proposal.TermsAndConditions,components.rfps.Editor,components.proposals.Editor,components.admin.ModeratorsConfigurator,components.template.AppLayout,components.molecule.Markdown,components.rfps.CommentsAndLogs,components.core.lib.contract sign-as devhub.near network-config mainnet
bos components delete devhub.near selected components.organism.Navbar,components.proposals.CommentsAndLogs,components.rfps.ConfirmCancelModal,components.proposals.ViewProposalModal,components.proposals.Feed,components.molecule.LikeButton,components.rfps.Feed,components.molecule.Compose,components.molecule.SimpleMDE,core.common,components.molecule.ComposeComment,components.molecule.FilterByLabel,components.molecule.DropDown,components.rfps.StatusTag,components.molecule.LinkedProposalsDropdown,components.rfps.TimelineConfigurator,components.pages.about,components.pages.admin,components.admin.AboutConfigurator,components.molecule.AccountInput sign-as devhub.near network-config mainnet
bos components delete devhub.near selected components.molecule.LinkedProposals,components.rfps.ViewRfpModal,components.molecule.LinkedRfps,components.molecule.RadioButton,components.molecule.LinkedRfpDropdown,components.molecule.NavbarDropdown,components.molecule.DropDownWithSearch,components.proposals.Proposal,components.molecule.MultiSelectCategoryDropdown,components.rfps.StageDropdown,components.admin.AccountsEditor,components.rfps.WarningModal,components.rfps.Rfp,devhub.entity.proposal.MultiSelectLabelsDropdown sign-as devhub.near network-config mainnet
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
fi