diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 231650ca14..cad5a7e15a 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -26,20 +26,17 @@ jobs: - name: Install poetry using pip run: pipx install poetry==1.8.0 - - name: Get current version - id: version - run: echo "version=$(node -p "require('./packages/jspsych/package.json').version")" >> "$GITHUB_ENV" - - - name: Select only major version - run: echo "version_major=${{ env.version }}" | awk -F. '{print "v"$1}' >> "$GITHUB_ENV" - + - name: Get major version only + id: version_major + run: echo "version_major=v$(node -p "require('./packages/jspsych/package.json').version" | awk -F. '{print $1}')" >> "$GITHUB_ENV" + - name: Config git run: | git config --global user.name docs-bot git config --global user.email docs@jspsych.org - name: Deploy docs - run: npm run docs:deploy ${{ env.version_major }} + run: npm run docs:deploy ${{ env.version_major }} latest - name: Switch to gh-pages branch run: git checkout gh-pages