From a95f0ef364c7a9ab504f4f31249912004463d58e Mon Sep 17 00:00:00 2001 From: Tim Brust Date: Tue, 26 May 2020 21:02:01 +0000 Subject: [PATCH] ci: updates docs push action by fetching tags & setting the correct tag (#1236) --- .github/workflows/docs.yml | 1 + script/publish-docs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9c71ec4e..2fbcfe2c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -10,6 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: git fetch --depth=20 origin +refs/tags/*:refs/tags/* - uses: actions/setup-node@v1 with: node-version: "12.x" diff --git a/script/publish-docs b/script/publish-docs index 8d768d83..7fb4f15c 100755 --- a/script/publish-docs +++ b/script/publish-docs @@ -4,10 +4,13 @@ set -e # Store the versions -VERSION=$(git describe --tags --match "v[0-9]*" --abbrev=0 | sed 's/^v//') +VERSION=$(git describe --tags $(git rev-list --tags --max-count=1) | sed 's/^v//') HEAD=$(git rev-parse HEAD) REPO=https://${OCTOKITBOT_PAT}@github.com/probot/probot.github.io.git +echo "Version is $VERSION" +echo "Head is $HEAD" + # Generate docs npm run doc