mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-18 12:09:29 -07:00
ci: prefine github action (#276)
* ci: migrate bundled artifacts update from pull request to direct commit * ci: update lint workflow to include code formatting and auto-commit * chore: update .prettierignore to include yaml files - Remove the exclusion of `*.yaml` and `*.yml` files from being formatted by Prettier in the `.prettierignore` file. * ci: update lint workflow conditions * ci: format code --------- Co-authored-by: Sped0n <Sped0n@users.noreply.github.com>
This commit is contained in:
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
any_changed: ${{ steps.changed-files-specific.outputs.any_changed }}
|
any_changed: ${{ steps.changed-files-specific.outputs.any_changed }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
@@ -45,7 +45,9 @@ jobs:
|
|||||||
id: version
|
id: version
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.PAT }}
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v2
|
||||||
@@ -84,10 +86,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Push artifacts
|
- name: Push artifacts
|
||||||
if: ${{ (github.event_name == 'push' || github.event.pull_request.merged == true) && needs.filter.outputs.any_changed == 'true' }}
|
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:
|
with:
|
||||||
token: ${{ secrets.PAT }}
|
commit_message: 'ci: update bundled artifacts'
|
||||||
title: "ci: update bundled artifacts"
|
|
||||||
commit-message: "ci: update bundled artifacts"
|
|
||||||
branch: update-artifacts-${{ steps.version.outputs.builddate }}
|
|
||||||
base: main
|
|
||||||
|
|||||||
19
.github/workflows/eslint.yml
vendored
19
.github/workflows/eslint.yml
vendored
@@ -17,7 +17,9 @@ jobs:
|
|||||||
name: Lint
|
name: Lint
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.PAT }}
|
||||||
|
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v2
|
uses: pnpm/action-setup@v2
|
||||||
@@ -38,5 +40,18 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint Check
|
||||||
|
continue-on-error: true
|
||||||
|
id: check
|
||||||
run: pnpm run lint: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'
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
node_modules
|
node_modules
|
||||||
static
|
static
|
||||||
exmapleSite
|
exmapleSite
|
||||||
*.yaml
|
|
||||||
*.yml
|
|
||||||
single.json
|
single.json
|
||||||
|
pnpm-lock.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user