update github action to deploy only major version info

This commit is contained in:
Josh de Leeuw 2024-06-06 09:41:31 -04:00
parent 474c1e1f78
commit 126f87becb

View File

@ -30,8 +30,8 @@ jobs:
id: version id: version
run: echo "version=$(node -p "require('./packages/jspsych/package.json').version")" >> "$GITHUB_ENV" run: echo "version=$(node -p "require('./packages/jspsych/package.json').version")" >> "$GITHUB_ENV"
- name: Remove patch version - name: Select only major version
run: echo "version_major_minor=${{ env.version }}" | awk -F. '{print $1"."$2}' >> "$GITHUB_ENV" run: echo "version_major=${{ env.version }}" | awk -F. '{print $1"."x}' >> "$GITHUB_ENV"
- name: Config git - name: Config git
run: | run: |
@ -39,7 +39,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_minor }} run: npm run docs:deploy ${{ env.version_major }}
- name: Switch to gh-pages branch - name: Switch to gh-pages branch
run: git checkout gh-pages run: git checkout gh-pages