ci: detect changes and use actions/stapler-deploy
Lint / Oxlint (push) Successful in 3m36s
Lint / ESLint (push) Successful in 3m36s
Lint / TypeScript (push) Successful in 3m36s
Deploy / Deploy to Stapler (push) Successful in 4m24s
Deploy / Build (push) Successful in 6m3s

This commit is contained in:
2026-05-02 23:50:47 +02:00
parent b6a5460a04
commit 6680d464c3
3 changed files with 31 additions and 18 deletions
+17 -8
View File
@@ -8,6 +8,17 @@ on:
push: push:
branches: branches:
- "main" - "main"
paths:
- '.github/workflows/deploy.yml'
- 'package.json'
- 'bun.lock'
- 'src/**'
- 'index.html'
- 'vite.config.ts'
- 'post-build.ts'
- 'tsconfig.*'
- 'env.d.ts'
- 'vite.d.ts'
jobs: jobs:
build: build:
@@ -39,18 +50,16 @@ jobs:
name: "Deploy to Stapler" name: "Deploy to Stapler"
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
if: ${{ vars.STAPLER_TARGET != '' }}
steps: steps:
- name: Download production files - name: Download production files
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
name: production-files name: production-files
path: ./dist path: ./dist
- name: Compress production files
run: tar -czC dist -f dist.tar.gz .
- name: Upload to Stapler server - name: Upload to Stapler server
run: | uses: actions/stapler-deploy@v1
curl -s -X PUT --fail-with-body --data-binary "@dist.tar.gz" \ with:
-H 'X-Token: ${{ secrets.STAPLER_TOKEN }}' \ path: dist
${{ vars.STAPLER_CURL_ARGS }} \ token: ${{ secrets.STAPLER_TOKEN }}
${{ vars.STAPLER_TARGET }} target: ${{ github.repository }}
extra_curl_args: ${{ vars.STAPLER_CURL_ARGS }}
+14 -1
View File
@@ -4,7 +4,20 @@ concurrency:
group: lint-${{ github.ref }} group: lint-${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
on: [push, workflow_dispatch] on:
workflow_dispatch:
push:
paths:
- '.github/workflows/lint.yml'
- 'package.json'
- 'bun.lock'
- 'src/**'
- 'articles.example/**'
- '.oxlintrc.json'
- 'eslint.config.ts'
- 'tsconfig.*'
- 'env.d.ts'
- 'vite.d.ts'
jobs: jobs:
lint-eslint: lint-eslint:
-9
View File
@@ -1,9 +0,0 @@
{
"recommendations": [
"Vue.volar",
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig",
"oxc.oxc-vscode",
"esbenp.prettier-vscode"
]
}