[ci] Fix docs deployment

Trigger build on tag pushes, and simplify the condition for calling
.ci/deploy-docs.sh.
This commit is contained in:
Khaled Hosny 2022-07-23 20:26:56 +02:00
parent 40b21edf48
commit efab763885
2 changed files with 2 additions and 6 deletions

View File

@ -3,11 +3,6 @@
set -x set -x
set -o errexit -o nounset 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 DOCSDIR=build-docs
REVISION=$(git rev-parse --short HEAD) REVISION=$(git rev-parse --short HEAD)

View File

@ -3,6 +3,7 @@ name: linux-ci
on: on:
push: push:
branches: [ main ] branches: [ main ]
tags: ["*.*.*"]
pull_request: pull_request:
branches: [ main ] branches: [ main ]
@ -26,7 +27,7 @@ jobs:
- name: generate documentations - name: generate documentations
run: ninja -Cbuild harfbuzz-doc run: ninja -Cbuild harfbuzz-doc
- name: deploy documentations - name: deploy documentations
if: github.event_name == 'push' && github.ref == 'refs/heads/main' if: github.ref_type == 'tag'
run: .ci/deploy-docs.sh run: .ci/deploy-docs.sh
env: env:
GH_TOKEN: ${{ secrets.GH_TOKEN }} GH_TOKEN: ${{ secrets.GH_TOKEN }}