diff --git a/.circleci/config.yml b/.circleci/config.yml index 3867b4d..98acb18 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,11 @@ workflows: branches: only: - main - - beta-1-support + - deploy_explorer0: + filters: + branches: + only: + - explorer0 # Just for reusing below step_defs: @@ -23,6 +27,41 @@ step_defs: command: node -v | grep v16 jobs: + deploy_explorer0: + machine: + image: ubuntu-2204:2022.04.1 + resource_class: large + steps: + - checkout + - run: *node_version + - run: *check_version + - run: + name: Install + command: yarn + - run: + name: Build backend image + command: docker build . -t jchancehud/unirep-explorer:explorer0 + - run: + name: Push backend image + command: | + echo $DOCKER_TOKEN | docker login -u jchancehud --password-stdin + docker push jchancehud/unirep-explorer:explorer0 + rm /home/circleci/.docker/config.json + - run: + name: Trigger service update + command: curl -X POST https://devops.unirep.io/api/webhooks/ad77ca9a-3bfa-474a-bb6c-83293773d440 + - run: + name: Set frontend config + command: echo 'export const SERVER = "https://api.explorer0.unirep.io"' > packages/frontend/src/config.js + - run: + name: Build frontend + command: yarn frontend build --mode production + - run: + name: Publish frontend + command: | + cd packages/frontend + npx wrangler@2.1 publish --env explorer0 + deploy: machine: image: ubuntu-2204:2022.04.1 diff --git a/packages/frontend/src/buildnum.js b/packages/frontend/src/buildnum.js new file mode 100644 index 0000000..425a05a --- /dev/null +++ b/packages/frontend/src/buildnum.js @@ -0,0 +1 @@ +export default 17 diff --git a/packages/frontend/src/components/ConfigInfoItem.jsx b/packages/frontend/src/components/ConfigInfoItem.jsx index e0833c6..fc4d870 100644 --- a/packages/frontend/src/components/ConfigInfoItem.jsx +++ b/packages/frontend/src/components/ConfigInfoItem.jsx @@ -8,7 +8,7 @@ export default observer(({ item, info, text }) => { <>