From 57e3a707c5ff51184fc76ce2dfa2f888d30d6698 Mon Sep 17 00:00:00 2001 From: Max Richter Date: Mon, 2 Feb 2026 17:46:04 +0100 Subject: [PATCH] chore(ci): simplify ci step --- .gitea/workflows/deploy.yaml | 42 +++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index ab44775..ee0ffa7 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -8,15 +8,12 @@ env: PNPM_CACHE_FOLDER: .pnpm-store jobs: - build_and_deploy: - if: github.ref == 'refs/heads/main' - needs: [lint] + setup: 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: @@ -24,22 +21,51 @@ jobs: key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm- - - name: ๐Ÿ“ฆ Install Dependencies run: pnpm install --frozen-lockfile --store-dir ${{ env.PNPM_CACHE_FOLDER }} + - name: ๐Ÿ—œ๏ธ Tar Workspace + run: tar -cf workspace.tar --exclude="${{ env.PNPM_CACHE_FOLDER }}" . + + - name: ๐Ÿ“ค Upload Workspace + uses: actions/upload-artifact@v3 + with: + name: workspace-deps + path: workspace.tar + compression-level: 0 + + lint: + needs: setup + runs-on: ubuntu-latest + container: jimfx/nodes:latest + steps: + - name: ๐Ÿ“ฅ Download Workspace + uses: actions/download-artifact@v3 + with: + name: workspace-deps + - name: ๐Ÿ”“ Untar Workspace + run: tar -xf workspace.tar && rm workspace.tar - name: ๐Ÿงน Run Linter run: pnpm lint - - name: ๐ŸŽจ Check Formatting run: pnpm format:check - - name: ๐Ÿงฌ Type Check run: pnpm check + build_and_deploy: + if: github.ref == 'refs/heads/main' + needs: [lint] + runs-on: ubuntu-latest + container: jimfx/nodes:latest + steps: + - name: ๐Ÿ“ฅ Download Workspace + uses: actions/download-artifact@v3 + with: + name: workspace-deps + - name: ๐Ÿ”“ Untar Workspace + run: tar -xf workspace.tar && rm workspace.tar - name: ๐Ÿ› ๏ธ Build Site run: pnpm run build:deploy - - name: ๐Ÿ”‘ Configure rclone run: | echo "$SSH_PRIVATE_KEY" > /tmp/id_rsa