summaryrefslogtreecommitdiff
path: root/scripts/travis_update_docs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/travis_update_docs.sh')
-rwxr-xr-xscripts/travis_update_docs.sh13
1 files changed, 3 insertions, 10 deletions
diff --git a/scripts/travis_update_docs.sh b/scripts/travis_update_docs.sh
index 80aceab..c45ccc8 100755
--- a/scripts/travis_update_docs.sh
+++ b/scripts/travis_update_docs.sh
@@ -5,7 +5,7 @@
set -euo pipefail
-# The travis token can be set at https://travis-ci.org/psycopg/psycopg2/settings
+# The travis token can be set at https://github.com/psycopg/psycopg2/settings/secrets/actions
# and can be set on a selected branch only (which should match the DOC_BRANCH
# in the psycopg-website Makefile, or it won't refresh a thing).
if [ -z "${TRAVIS_TOKEN:-}" ]; then
@@ -13,18 +13,11 @@ if [ -z "${TRAVIS_TOKEN:-}" ]; then
exit 0
fi
-# Avoid to rebuild the website for each matrix entry.
-want_python="3.6"
-if [ "${TRAVIS_PYTHON_VERSION}" != "${want_python}" ]; then
- echo "skipping docs update: only updated on Python ${want_python} build" >&2
- exit 0
-fi
-
echo "triggering psycopg-website rebuild" >&2
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token ${TRAVIS_TOKEN}" \
- -d '{ "request": { "branch":"master" }}' \
- https://api.travis-ci.org/repo/psycopg%2Fpsycopg-website/requests
+ -d "{\"request\": {\"branch\": \"${TRAVIS_BRANCH}\"}}" \
+ https://api.travis-ci.com/repo/psycopg%2Fpsycopg-website/requests