diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3ce4e96..ebc0cde 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: outputs: any_changed: ${{ steps.changed-files-specific.outputs.any_changed }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -45,7 +45,9 @@ jobs: id: version - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + token: ${{ secrets.PAT }} - name: Setup Hugo uses: peaceiris/actions-hugo@v2 @@ -84,10 +86,6 @@ jobs: - name: Push artifacts if: ${{ (github.event_name == 'push' || github.event.pull_request.merged == true) && needs.filter.outputs.any_changed == 'true' }} - uses: peter-evans/create-pull-request@v5 + uses: stefanzweifel/git-auto-commit-action@v5 with: - token: ${{ secrets.PAT }} - title: "ci: update bundled artifacts" - commit-message: "ci: update bundled artifacts" - branch: update-artifacts-${{ steps.version.outputs.builddate }} - base: main + commit_message: 'ci: update bundled artifacts' diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 231abc6..35da55b 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -17,7 +17,9 @@ jobs: name: Lint steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + token: ${{ secrets.PAT }} - name: Setup pnpm uses: pnpm/action-setup@v2 @@ -38,5 +40,18 @@ jobs: - name: Install dependencies run: pnpm install - - name: Lint + - name: Lint Check + continue-on-error: true + id: check run: pnpm run lint:check + + - name: Format manually + id: format + if: ${{ steps.check.outcome == 'failure' }} + run: pnpm run lint + + - name: Commit + if: ${{ steps.format.outcome == 'success' }} + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: 'ci: format code' diff --git a/.prettierignore b/.prettierignore index 136eb57..0ba978c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,6 +1,5 @@ node_modules static exmapleSite -*.yaml -*.yml single.json +pnpm-lock.yaml