diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0725f43..171b87d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,6 +8,17 @@ on: push: branches: - "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: build: @@ -39,18 +50,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 248690c..ecf2975 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,7 +4,20 @@ 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/**' + - 'articles.example/**' + - '.oxlintrc.json' + - 'eslint.config.ts' + - 'tsconfig.*' + - 'env.d.ts' + - 'vite.d.ts' jobs: lint-eslint: diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 3f84126..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "recommendations": [ - "Vue.volar", - "dbaeumer.vscode-eslint", - "EditorConfig.EditorConfig", - "oxc.oxc-vscode", - "esbenp.prettier-vscode" - ] -}