5 echo "About to publish $GITHUB_REF to gh-pages..."
10 git config --global user.name "$GIT_USER_NAME"
11 git config --global user.email "$GIT_USER_EMAIL"
12 git clone -b gh-pages --single-branch https://"${GH_TOKEN_PUBLIC}"@github.com/ajv-validator/ajv.git ../gh-pages
14 rsync -a ./docs/.vuepress/dist/ ../gh-pages
18 if [[ $(git status --porcelain) ]]; then
19 echo "Changes detected. Updating gh-pages branch..."
21 git commit -m "updated by ajv workflow https://github.com/ajv-validator/ajv/actions/runs/$GITHUB_RUN_ID"
22 git push --quiet origin gh-pages > /dev/null 2>&1