From a87ea72980c016a770d0db9cee298de37b32cde9 Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Fri, 30 Jul 2021 22:34:15 +0800 Subject: [PATCH] chore: add deploy dev workflow --- .github/workflows/deploy-dev.yml | 35 ++++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/deploy-dev.yml diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml new file mode 100644 index 000000000..c51b193d2 --- /dev/null +++ b/.github/workflows/deploy-dev.yml @@ -0,0 +1,35 @@ +name: Deploy Dev + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v2 + with: + node-version: '14' + + # https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time + - name: Cache pnpm modules + uses: actions/cache@v2 + with: + path: ~/.pnpm-store + key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}- + + - uses: pnpm/action-setup@v2.0.1 + with: + version: 6.0.2 + run_install: true + + - name: Build + run: pnpm -- lerna run build --stream diff --git a/package.json b/package.json index b3d849a28..50cd66b3e 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "root", "private": true, "scripts": { + "preinstall": "npx only-allow pnpm", "lerna": "lerna", "bootstrap": "lerna bootstrap", "prepare": "husky install && lerna run --stream prepack",