diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index f27431787e3c641d6330b0f1c470426d9916a3fb..84720429844929992448bcd351f4e54a9f809d68 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -10,6 +10,9 @@ jobs:
     runs-on: ubuntu-latest
     steps:
     - uses: actions/checkout@master
+      with:
+        fetch-depth: 0
+        ref: ${{ github.event.pull_request.head.ref }}
     - uses: actions-rs/toolchain@v1.0.7
       with:
         toolchain: stable