From 71af2162b5f752555863c258d8ef2091aef7703f Mon Sep 17 00:00:00 2001 From: yanglbme Date: Fri, 5 Mar 2021 09:48:50 +0800 Subject: [PATCH] chore: update workflow and close #29 --- .github/workflows/branch-merge.yml | 4 ++-- .github/workflows/prettier.yml | 24 ++++++++++++------------ .github/workflows/sync.yml | 20 ++++++++++---------- index.html | 2 +- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/branch-merge.yml b/.github/workflows/branch-merge.yml index 5ef50b8..e4c405f 100644 --- a/.github/workflows/branch-merge.yml +++ b/.github/workflows/branch-merge.yml @@ -2,7 +2,7 @@ name: Merge Branch on: push: - branches: [ imgbot ] + branches: [imgbot] jobs: merge-branch: @@ -14,4 +14,4 @@ jobs: github_token: ${{ github.token }} source_ref: ${{ github.ref }} target_branch: main - commit_message_template: '[Automated] Merged {source_ref} into {target_branch}' + commit_message_template: "[Automated] Merged {source_ref} into {target_branch}" diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index ffe2ba3..420e387 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -4,22 +4,22 @@ on: pull_request: push: branches: - - main + - main jobs: prettier: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - with: - ref: ${{ github.head_ref }} + - name: Checkout + uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} - - name: Prettify - uses: creyD/prettier_action@v3.3 - with: - prettier_options: --write **/*.{md} - commit_message: 'docs: prettify code or document' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + - name: Prettify + uses: creyD/prettier_action@v3.3 + with: + prettier_options: --write **/*.{md} + commit_message: "style: prettify code or document" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 6b4e5e5..4d06f46 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -2,26 +2,26 @@ name: Sync on: push: - branches: [ main ] + branches: [main] jobs: build: runs-on: ubuntu-latest if: github.repository == 'doocs/technical-books' steps: - - uses: actions/checkout@v2 - - - name: Sync to Gitee - uses: wearerequired/git-mirror-action@master - env: + - uses: actions/checkout@v2 + + - name: Sync to Gitee + uses: wearerequired/git-mirror-action@master + env: SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }} - with: + with: source-repo: git@github.com:doocs/technical-books.git destination-repo: git@gitee.com:Doocs/technical-books.git - - name: Build Gitee Pages - uses: yanglbme/gitee-pages-action@main - with: + - name: Build Gitee Pages + uses: yanglbme/gitee-pages-action@main + with: gitee-username: yanglbme gitee-password: ${{ secrets.GITEE_PASSWORD }} gitee-repo: doocs/technical-books diff --git a/index.html b/index.html index 8064632..b58cede 100644 --- a/index.html +++ b/index.html @@ -26,7 +26,7 @@ search: ["/"], plugins: [ function (hook) { - var footer = [ + const footer = [ "
", "