From b349520a440d3769222f1e2a29e8ebc967812277 Mon Sep 17 00:00:00 2001 From: jiaojiaodubai <63148861+jiaojiaodubai@users.noreply.github.com> Date: Thu, 18 Apr 2024 08:19:20 +0800 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6bcc211..e522418 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,6 +4,9 @@ on: branches: - master - test + + paths: + - '*.js' workflow_dispatch: jobs: build: @@ -13,12 +16,7 @@ jobs: - name: 'Checkout codes' uses: actions/checkout@v3 - # We're in a shallow single-branch clone, so get the origin/master HEAD if not already on master - # and get more history on the current branch so we can find the branch point - # fix fatal: ambiguous argument 'HEAD~1': unknown revision or path not in the working tree. - - run: git fetch origin master:master --depth=1 - if: github.ref != 'refs/heads/master' - - run: git fetch --update-shallow --depth=100 origin $(git rev-list HEAD) + - run: git fetch origin master:master - name: Install Node uses: actions/setup-node@v2