mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 19:20:55 +00:00
update action version logic
This commit is contained in:
parent
7ddac35c43
commit
c6a5691c06
11
.github/workflows/publish-docs.yml
vendored
11
.github/workflows/publish-docs.yml
vendored
@ -26,12 +26,9 @@ jobs:
|
|||||||
- name: Install poetry using pip
|
- name: Install poetry using pip
|
||||||
run: pipx install poetry==1.8.0
|
run: pipx install poetry==1.8.0
|
||||||
|
|
||||||
- name: Get current version
|
- name: Get major version only
|
||||||
id: version
|
id: version_major
|
||||||
run: echo "version=$(node -p "require('./packages/jspsych/package.json').version")" >> "$GITHUB_ENV"
|
run: echo "version_major=v$(node -p "require('./packages/jspsych/package.json').version" | awk -F. '{print $1}')" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Select only major version
|
|
||||||
run: echo "version_major=${{ env.version }}" | awk -F. '{print "v"$1}' >> "$GITHUB_ENV"
|
|
||||||
|
|
||||||
- name: Config git
|
- name: Config git
|
||||||
run: |
|
run: |
|
||||||
@ -39,7 +36,7 @@ jobs:
|
|||||||
git config --global user.email docs@jspsych.org
|
git config --global user.email docs@jspsych.org
|
||||||
|
|
||||||
- name: Deploy docs
|
- 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
|
- name: Switch to gh-pages branch
|
||||||
run: git checkout gh-pages
|
run: git checkout gh-pages
|
||||||
|
Loading…
Reference in New Issue
Block a user