Skip to content

Commit

Permalink
update action version logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jodeleeuw committed Jun 7, 2024
1 parent 7ddac35 commit c6a5691
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]
- 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
Expand Down

0 comments on commit c6a5691

Please sign in to comment.