1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-28 02:37:11 +00:00

Merge pull request #408 from marquiz/fixes/gh-pages

scripts/update-gh-pages: only update docs if version has been released
This commit is contained in:
Kubernetes Prow Robot 2020-12-03 03:01:00 -08:00 committed by GitHub
commit 7f5d2390bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View file

@ -14,6 +14,8 @@ jobs:
- name: Check out repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fetch gh-pages branch
run: git fetch --no-tags --prune --depth=1 origin refs/heads/gh-pages:refs/heads/gh-pages

View file

@ -100,6 +100,20 @@ fi
# Default to 'master' if no subdir was given and we couldn't parse
# it
site_subdir=${site_subdir:-master}
# Check if this ref is for a released version
if [ "$site_subdir" != "master" ]; then
_base_tag=`git describe --abbrev=0 || :`
case "$_base_tag" in
$site_subdir*)
;;
*)
echo "Not a released version. Parsed release branch is $site_subdir but based on tag $_base_tag. Stopping here."
exit 0
;;
esac
fi
echo "Updating site subdir: '$site_subdir'"
export SITE_DESTDIR="_site/$site_subdir"