From e638c79d0c95ef9a8a94dd35d2e4ad53e43ac78e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Tainon?= Date: Mon, 6 May 2024 15:02:02 +0200 Subject: [PATCH] Update CircleCI config --- .circleci/config.yml | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 466cc976..5541a85e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,21 +13,38 @@ jobs: echo "registry=https://registry.npmjs.org/" >> ~/.npmrc echo "@france-ioi:registry=https://npm.pkg.github.com/" >> ~/.npmrc echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc - cat ~/.npmrc name: "Setup Node auth token" - run: command: git submodule update --init name: Fetch submodules - - run: - command: yarn install --frozen-lockfile -# - node/install-packages: -# pkg-manager: yarn + - node/install-packages: + pkg-manager: yarn - run: command: cp config.json.template config.json name: Copy config - run: command: yarn build-lib name: Build Codecast lib + - persist_to_workspace: + root: . + paths: + - 'build' + commit: + machine: true + steps: + - attach_workspace: + at: . + - run: + command: | + ls -asl build + git config credential.helper cache + git config user.email "admin@france-ioi.org" + git config user.name "Deployment" + git clone git@github.com:France-ioi/bebras-modules.git + cp build/index.js bebras-modules/ext/codecast/7.4/index.js + cp build/index.css bebras-modules/ext/codecast/7.4/index.css + cp build/index.worker.worker.js bebras-modules/ext/codecast/7.4/index.worker.worker.js + git commit --allow-empty -m "Upgrade Codecast 7.4" workflows: deploy: @@ -36,3 +53,9 @@ workflows: filters: branches: only: lib + - commit: + requires: + - build + filters: + branches: + only: lib