66REF=" $GITHUB_REF_NAME "
77# The first path component, e.g. "infrastructure" or "profiles".
88COMPONENT=" ${PATH_PREFIX%%/* } "
9+ # The hostname, in case of proxy.
10+ HOST=ocp19.open-contracting.org
911
1012# If a git tag or live branch is pushed.
1113if [ " $PRODUCTION " = " true" ]; then
1618 SUFFIX=" "
1719fi
1820
19- curl --silent --connect-timeout 1 standard.open-contracting.org:8255 || true
20-
2121# If a git tag isn't pushed, deploy the build directory from the git branch.
2222if [ " $RELEASE " != " true" ]; then
23- curl --silent --connect-timeout 1 standard.open-contracting.org :8255 || true
24- rsync -az --delete-after build/ ocds-docs@standard.open-contracting.org :web/" $PREFIX " " $PATH_PREFIX " " $REF " " $SUFFIX "
23+ curl --silent --connect-timeout 1 $HOST :8255 || true
24+ rsync -az --delete-after build/ ocds-docs@$HOST :web/" $PREFIX " " $PATH_PREFIX " " $REF " " $SUFFIX "
2525
2626 # Index the build directory.
2727 ocdsindex sphinx build/ https://standard.open-contracting.org/" $PREFIX " " $PATH_PREFIX " " $REF " / > documents.json
@@ -33,9 +33,9 @@ if [ "$RELEASE" != "true" ]; then
3333
3434 if [ " $PRODUCTION " = " true" ]; then
3535 # Symlink the live directory.
36- curl --silent --connect-timeout 1 standard.open-contracting.org :8255 || true
36+ curl --silent --connect-timeout 1 $HOST :8255 || true
3737 # shellcheck disable=SC2087
38- ssh ocds-docs@standard.open-contracting.org /bin/bash << - EOF
38+ ssh ocds-docs@$HOST /bin/bash << - EOF
3939 mkdir -p /home/ocds-docs/web/$PREFIX$PATH_PREFIX
4040 ln -nfs $REF$SUFFIX /home/ocds-docs/web/$PREFIX$PATH_PREFIX$REF
4141 EOF
4949 fi
5050
5151 # Deploy the schema files, codelist files and metadata file (if any).
52- curl --silent --connect-timeout 1 standard.open-contracting.org :8255 || true
52+ curl --silent --connect-timeout 1 $HOST :8255 || true
5353 # shellcheck disable=SC2087
54- ssh ocds-docs@standard.open-contracting.org /bin/bash << - EOF
54+ ssh ocds-docs@$HOST /bin/bash << - EOF
5555 mkdir -p /home/ocds-docs/web/"$PATH_PREFIX ""$DIRECTORY "/"$REF "/
5656 cp -r /home/ocds-docs/web/"$PATH_PREFIX ""$VERSION "/en/*.json /home/ocds-docs/web/"$PATH_PREFIX ""$DIRECTORY "/"$REF "/
5757 cp -r /home/ocds-docs/web/"$PATH_PREFIX ""$VERSION "/en/codelists /home/ocds-docs/web/"$PATH_PREFIX ""$DIRECTORY "/"$REF "/
0 commit comments