ci: updates docs push action by fetching tags & setting the correct tag (#1236)

This commit is contained in:
Tim Brust 2020-05-26 21:02:01 +00:00 committed by GitHub
parent 8a057d2b01
commit a95f0ef364
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -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"

View File

@ -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