diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 516fdf9f..04d4c6d2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,9 +20,18 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + with: + # Make sure the actual branch is checked out when running on pull requests + ref: ${{ github.event.pull_request.base.ref }} + + # This is important to fetch the changes to the previous commit + fetch-depth: 0 - name: Prettify code uses: creyD/prettier_action@v4.0 + with: + prettier_options: "src/**/*.{ts,jsx,js,css,html,json,md}" --write + only_changed: True build: # The type of runner that the job will run on if: github.event_name != 'pull_request'