[ci] Fix docs deployment

Trigger build on tag pushes, and simplify the condition for calling
.ci/deploy-docs.sh.
diff --git a/.ci/deploy-docs.sh b/.ci/deploy-docs.sh
index 361c457..2b3f9f2 100755
--- a/.ci/deploy-docs.sh
+++ b/.ci/deploy-docs.sh
@@ -3,11 +3,6 @@
 set -x
 set -o errexit -o nounset
 
-if [ "$GITHUB_REF_TYPE" != "tag" ]; then
-	echo "Skipping docs deployment on a non-tagged build";
-	exit 0;
-fi
-
 DOCSDIR=build-docs
 REVISION=$(git rev-parse --short HEAD)
 
diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml
index 74ed970..f445d5d 100644
--- a/.github/workflows/linux-ci.yml
+++ b/.github/workflows/linux-ci.yml
@@ -3,6 +3,7 @@
 on:
   push:
     branches: [ main ]
+    tags: ["*.*.*"]
   pull_request:
     branches: [ main ]
 
@@ -26,7 +27,7 @@
     - name: generate documentations
       run: ninja -Cbuild harfbuzz-doc
     - name: deploy documentations
-      if: github.event_name == 'push' && github.ref == 'refs/heads/main'
+      if: github.ref_type == 'tag'
       run: .ci/deploy-docs.sh
       env:
         GH_TOKEN: ${{ secrets.GH_TOKEN }}