mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
update action version logic
This commit is contained in:
parent
7ddac35c43
commit
c6a5691c06
13
.github/workflows/publish-docs.yml
vendored
13
.github/workflows/publish-docs.yml
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user