ci: detect changes and use actions/stapler-deploy
Lint / TypeScript (push) Successful in 6m59s
Lint / Oxlint (push) Successful in 7m0s
Lint / ESLint (push) Successful in 8m3s
Deploy / Build (push) Successful in 8m53s
Deploy / Deploy to Stapler (push) Successful in 6m58s

This commit is contained in:
2026-05-02 23:23:30 +02:00
parent 5b1d9692be
commit d038a272d3
2 changed files with 28 additions and 10 deletions
+16 -9
View File
@@ -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:
@@ -15,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Bun
uses: https://github.com/oven-sh/setup-bun@v2
uses: actions/setup-bun@v2
- name: Checkout repository
uses: actions/checkout@v6
- name: Install dependencies
@@ -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 }}