From 6f33cdf0664de82a864825a1cdaa77504c5c0595 Mon Sep 17 00:00:00 2001 From: Max Richter Date: Mon, 2 Feb 2026 16:28:08 +0100 Subject: [PATCH] feat(ci): run on every branch --- .gitea/workflows/deploy.yaml | 70 +++++++++++------------------------- 1 file changed, 21 insertions(+), 49 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index d2414b1..33e81d6 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -2,28 +2,31 @@ name: ๐Ÿ—๏ธ Build and Deploy on: push: - branches: "main" + branches: ["*"] env: PNPM_CACHE_FOLDER: .pnpm-store +x-templates: + setup-steps: &setup-steps + - name: ๐Ÿ“‘ Checkout Code + uses: actions/checkout@v4 + + - name: ๐Ÿ’พ Setup pnpm Cache + uses: actions/cache@v4 + with: + path: ${{ env.PNPM_CACHE_FOLDER }} + key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + + - name: ๐Ÿ“ฆ Install Dependencies + run: pnpm install --frozen-lockfile --store-dir ${{ env.PNPM_CACHE_FOLDER }} + jobs: lint: runs-on: ubuntu-latest container: jimfx/nodes:latest steps: - - name: ๐Ÿ“‘ Checkout Code - uses: actions/checkout@v4 - - - name: ๐Ÿ’พ Setup pnpm Cache - uses: actions/cache@v4 - with: - path: ${{ env.PNPM_CACHE_FOLDER }} - key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} - - - name: ๐Ÿ“ฆ Install Dependencies - run: pnpm install --frozen-lockfile --store-dir ${{ env.PNPM_CACHE_FOLDER }} - + - <<: *setup-steps - name: ๐Ÿงน Run Linter run: pnpm lint @@ -31,18 +34,7 @@ jobs: runs-on: ubuntu-latest container: jimfx/nodes:latest steps: - - name: ๐Ÿ“‘ Checkout Code - uses: actions/checkout@v4 - - - name: ๐Ÿ’พ Setup pnpm Cache - uses: actions/cache@v4 - with: - path: ${{ env.PNPM_CACHE_FOLDER }} - key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} - - - name: ๐Ÿ“ฆ Install Dependencies - run: pnpm install --frozen-lockfile --store-dir ${{ env.PNPM_CACHE_FOLDER }} - + - <<: *setup-steps - name: ๐ŸŽจ Check Formatting run: pnpm format:check @@ -50,38 +42,18 @@ jobs: runs-on: ubuntu-latest container: jimfx/nodes:latest steps: - - name: ๐Ÿ“‘ Checkout Code - uses: actions/checkout@v4 - - - name: ๐Ÿ’พ Setup pnpm Cache - uses: actions/cache@v4 - with: - path: ${{ env.PNPM_CACHE_FOLDER }} - key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} - - - name: ๐Ÿ“ฆ Install Dependencies - run: pnpm install --frozen-lockfile --store-dir ${{ env.PNPM_CACHE_FOLDER }} - + - <<: *setup-steps - name: ๐Ÿงฌ Type Check run: pnpm check build_and_deploy: + if: github.ref == 'refs/heads/main' needs: [lint, format, typecheck] runs-on: ubuntu-latest container: jimfx/nodes:latest steps: - - name: ๐Ÿ“‘ Checkout Code - uses: actions/checkout@v4 - - - name: ๐Ÿ’พ Setup pnpm Cache - uses: actions/cache@v4 - with: - path: ${{ env.PNPM_CACHE_FOLDER }} - key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} - - - name: ๐Ÿ“ฆ Install Dependencies - run: pnpm install --frozen-lockfile --store-dir ${{ env.PNPM_CACHE_FOLDER }} - + - <<: *setup-steps + - name: ๐Ÿ› ๏ธ Build Site run: pnpm run build:deploy