⚙️ Update check & deploy workflow

This commit is contained in:
pheralb 2024-10-01 09:18:51 +01:00
parent 10ed96ae7b
commit 28531bde76
4 changed files with 67 additions and 87 deletions

65
.github/workflows/check-app.yml vendored Normal file
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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