From 42e53e3c87f3630aba75b92f7684be84259baf6f Mon Sep 17 00:00:00 2001 From: Agusx1211 Date: Wed, 8 Nov 2023 14:52:50 +0000 Subject: [PATCH] Alt build workflow --- .github/workflows/build.yml | 32 +++++++++++++++++++++++++ .github/workflows/main.yml | 48 ------------------------------------- 2 files changed, 32 insertions(+), 48 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..dd1757a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,32 @@ +name: build dapp + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + name: Build and Push + steps: + - name: git-checkout + uses: actions/checkout@v3 + + - name: Setup PNPM + uses: pnpm/action-setup@v2 + with: + version: 8 + run_install: true + + - name: Build + run: pnpm build + + - name: Push + uses: s0/git-publish-subdir-action@develop + env: + REPO: self + BRANCH: master + FOLDER: dist + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MESSAGE: 'Build: ({sha}) {msg}' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index dd1dd9d..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: GH Pages Deploy - -on: - push: - branches: [master] - paths-ignore: - - "*.md" - - pull_request: - branches: [master] - paths-ignore: - - "*.md" - -jobs: - build-deploy: - name: Build and deploy app - - runs-on: ubuntu-latest - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@master - with: - persist-credentials: false - - - name: Get yarn cache - id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v1 - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - name: Install dependencies 🔧 - run: yarn install - - - name: Build 🏗️ - run: yarn build - - - name: Deploy to GH Pages 🚀 - if: ${{ github.event_name != 'pull_request' }} - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: dist