diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 02fb8ea..7c56a8c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,8 @@ name: build on: push: branches: [ master ] + pull_request: + branches: [ master ] jobs: build: @@ -37,7 +39,9 @@ jobs: - run: pnpm website:build - name: Install Surge + if: github.ref == 'refs/heads/master' run: npm install -g surge - name: Deploy to Surge + if: github.ref == 'refs/heads/master' run: surge ./website https://bzc-ui.surge.sh/ --token ${{secrets.SURGE}} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml deleted file mode 100644 index 07471e4..0000000 --- a/.github/workflows/pull-request.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: pull-request - -on: - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [20.x] - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - - uses: pnpm/action-setup@v3 - with: - version: 8 - - - run: pnpm install - - run: node ./scripts/getStoriesList.js - - run: pnpm eslint . - - run: pnpm flow - - run: pnpm jest - - run: pnpm build - - run: pnpm website:build