diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 3fc5f8ed73..3576046b47 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -16,6 +16,9 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref || github.ref_name }} + fetch-depth: 0 - name: Set up Node.js uses: actions/setup-node@v2 @@ -46,4 +49,4 @@ jobs: git config user.email "${{ github.actor }}@users.noreply.github.com" git add . git commit -m "chore: format code with Prettier" - git push \ No newline at end of file + git push origin HEAD:${{ github.head_ref || github.ref_name }} \ No newline at end of file