From 397830182a948a20761f8dbea738d872d705869d Mon Sep 17 00:00:00 2001 From: klemek Date: Sat, 2 May 2026 23:24:02 +0200 Subject: [PATCH] ci: detect changes and use actions/stapler-deploy --- .github/workflows/deploy.yml | 23 +++++++++++++++-------- .github/workflows/lint.yml | 13 ++++++++++++- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ca24554..69cd812 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,6 +8,15 @@ on: push: branches: - "main" + paths: + - '.github/workflows/deploy.yml' + - 'package.json' + - 'bun.lock' + - 'src/**' + - 'index.html' + - 'vite.config.ts' + - 'tsconfig.*' + - 'env.d.ts' jobs: build: @@ -32,18 +41,16 @@ jobs: name: "Deploy to Stapler" runs-on: ubuntu-latest needs: build - if: ${{ vars.STAPLER_TARGET != '' }} steps: - name: Download production files uses: actions/download-artifact@v3 with: name: production-files path: ./dist - - name: Compress production files - run: tar -czC dist -f dist.tar.gz . - name: Upload to Stapler server - run: | - curl -s -X PUT --fail-with-body --data-binary "@dist.tar.gz" \ - -H 'X-Token: ${{ secrets.STAPLER_TOKEN }}' \ - ${{ vars.STAPLER_CURL_ARGS }} \ - ${{ vars.STAPLER_TARGET }} + uses: actions/stapler-deploy@v1 + with: + path: dist + token: ${{ secrets.STAPLER_TOKEN }} + target: ${{ github.repository }} + extra_curl_args: ${{ vars.STAPLER_CURL_ARGS }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 69ce87d..67a8878 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,7 +4,18 @@ concurrency: group: lint-${{ github.ref }} cancel-in-progress: true -on: [push, workflow_dispatch] +on: + workflow_dispatch: + push: + paths: + - '.github/workflows/lint.yml' + - 'package.json' + - 'bun.lock' + - 'src/**' + - '.oxlintrc.json' + - 'eslint.config.ts' + - 'tsconfig.*' + - 'env.d.ts' jobs: lint-eslint: