diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b980102..c9134c8 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,6 +1,7 @@ name: Update Docs on: + workflow_dispatch: push: tags: - '*' @@ -20,7 +21,8 @@ jobs: - name: Update docs run: | cd master-branch - version="${GITHUB_REF#refs/tags/}" + git fetch --prune --unshallow --tags + version="$(git describe --abbrev=0 --tags)" for v in `sort -rV <(printf '%s\n%s' "${version}" "$(ls ../docs-branch/versions)")`; do base="$(basename "${v}")" @@ -32,6 +34,7 @@ jobs: cd ../docs-branch mkdir -p versions + [[ -e "versions/${version}" ]] && rm -rf "versions/${version}" mv ../docs-perm "versions/${version}" mv versions .git ../docs cd ../docs