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:
commit
7f5d2390bf
2 changed files with 16 additions and 0 deletions
2
.github/workflows/gh-pages.yml
vendored
2
.github/workflows/gh-pages.yml
vendored
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue