From 78f2126e9604de2fa720847008148044dee6f7fa Mon Sep 17 00:00:00 2001 From: klemek Date: Sat, 2 May 2026 16:24:58 +0200 Subject: [PATCH] ci: deploy to stapler --- .github/workflows/deploy.yml | 27 +++++++++++++++++++++++++++ .github/workflows/lint.yml | 13 ------------- 2 files changed, 27 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/deploy.yml delete mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..15c59c5 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,27 @@ +name: Deploy + +concurrency: + group: deploy-${{ github.ref }} + cancel-in-progress: true + +on: + push: + branches: + - "main" + +jobs: + stapler: + name: "Deploy to Stapler" + runs-on: ubuntu-latest + if: ${{ vars.STAPLER_TARGET != '' }} + steps: + - name: Checkout repository + uses: actions/checkout@v6 + - name: Compress production files + run: tar -czf /tmp/dist.tar.gz . + - name: Upload to Stapler server + run: | + curl -s -X PUT --data-binary "@/tmp/dist.tar.gz" \ + -H 'X-Token: ${{ secrets.STAPLER_TOKEN }}' \ + ${{ vars.STAPLER_CURL_ARGS }} \ + ${{ vars.STAPLER_TARGET }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index b495137..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Lint - -on: [push] - -jobs: - eslint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Install modules - run: npm ci - - name: Run ESLint - run: npm run lint