From 28531bde764c98a7c86035d60d08aea4d7db18e5 Mon Sep 17 00:00:00 2001 From: pheralb Date: Tue, 1 Oct 2024 09:18:51 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20Update=20check=20&=20deplo?= =?UTF-8?q?y=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/check-app.yml | 65 +++++++++++++++++++++++++ .github/workflows/check-vitest-svgs.yml | 47 ------------------ .github/workflows/deploy-api.yml | 4 +- .github/workflows/deploy-app.yml | 38 --------------- 4 files changed, 67 insertions(+), 87 deletions(-) create mode 100644 .github/workflows/check-app.yml delete mode 100644 .github/workflows/check-vitest-svgs.yml delete mode 100644 .github/workflows/deploy-app.yml diff --git a/.github/workflows/check-app.yml b/.github/workflows/check-app.yml new file mode 100644 index 0000000..f2d0dba --- /dev/null +++ b/.github/workflows/check-app.yml @@ -0,0 +1,65 @@ +name: 🧑‍🚀 Check + +on: + push: + branches: + - main + - next + pull_request: + branches: + - main + - next + +jobs: + vitest: + runs-on: ubuntu-latest + name: ⚡ Testing with Vitest + steps: + - uses: actions/checkout@v4 + + - name: Setup pnpm 9 + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Install dependencies + run: pnpm install + + - name: Run Vitest + run: pnpm test + + svgs-size: + runs-on: ubuntu-latest + name: 📦 SVGs Size + steps: + - uses: actions/checkout@v4 + + - name: Setup pnpm 9 + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Install utility dependencies + run: pnpm install + working-directory: ./utils/check-size + + - name: Check svgs size + run: pnpm start + working-directory: ./utils/check-size + + build-app: + runs-on: ubuntu-latest + name: 🛠️ Build app + steps: + - uses: actions/checkout@v4 + + - name: Setup pnpm 9 + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Install dependencies + run: pnpm install + + - name: Build app + run: pnpm build diff --git a/.github/workflows/check-vitest-svgs.yml b/.github/workflows/check-vitest-svgs.yml deleted file mode 100644 index 5514bd4..0000000 --- a/.github/workflows/check-vitest-svgs.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: 🛠️ Check - -on: - push: - branches: - - main - - next - pull_request: - branches: - - main - - next - -jobs: - vitest: - runs-on: ubuntu-latest - name: Testing with Vitest - steps: - - uses: actions/checkout@v3 - - - name: Setup pnpm 8 - uses: pnpm/action-setup@v2 - with: - version: 8 - - - name: Install dependencies - run: pnpm install - - - name: Run Vitest - run: pnpm test - svgs-size: - runs-on: ubuntu-latest - name: SVGs Size - steps: - - uses: actions/checkout@v3 - - - name: Setup pnpm 8 - uses: pnpm/action-setup@v2 - with: - version: 8 - - - name: Install dependencies - run: pnpm install - working-directory: ./utils/check-size - - - name: Check svgs size - run: pnpm start - working-directory: ./utils/check-size diff --git a/.github/workflows/deploy-api.yml b/.github/workflows/deploy-api.yml index dc17064..261f3c6 100644 --- a/.github/workflows/deploy-api.yml +++ b/.github/workflows/deploy-api.yml @@ -1,4 +1,4 @@ -name: 🚀 Deploy API +name: 🚀 Deploy on: push: @@ -8,7 +8,7 @@ on: jobs: deploy: runs-on: ubuntu-latest - name: Cloudflare Workers + name: API - Cloudflare Workers steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/deploy-app.yml b/.github/workflows/deploy-app.yml deleted file mode 100644 index 351eaab..0000000 --- a/.github/workflows/deploy-app.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: 🚀 Deploy APP - -on: - push: - branches: - - next - -jobs: - build: - runs-on: self-hosted - strategy: - matrix: - node-version: [20] - - env: - SVGL_API_REQUESTS: ${{ secrets.SVGL_API_REQUESTS }} - UPSTASH_REDIS_URL: ${{ secrets.UPSTASH_REDIS_URL }} - UPSTASH_REDIS_TOKEN: ${{ secrets.UPSTASH_REDIS_TOKEN }} - - steps: - - uses: actions/checkout@v4 - - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - version: 9 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - - - name: Install dependencies - run: pnpm install - - - name: Build - run: pnpm build