fix(nx-dev): publish docs when on the latest tag (#20182)
This commit is contained in:
parent
07aff97c56
commit
dc3e1404b7
7
.github/workflows/publish.yml
vendored
7
.github/workflows/publish.yml
vendored
@ -240,12 +240,15 @@ jobs:
|
|||||||
npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
|
npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
|
||||||
pnpm nx-release --local=false $GITHUB_REF_NAME
|
pnpm nx-release --local=false $GITHUB_REF_NAME
|
||||||
- name: Trigger Docs Release
|
- name: Trigger Docs Release
|
||||||
# Publish docs only on a full release and when publishing the latest version
|
# Publish docs only on a full release
|
||||||
if: ${{ !github.event.release.prerelease && github.event.release.target_commitish == 'master' }}
|
if: ${{ !github.event.release.prerelease }}
|
||||||
run: |
|
run: |
|
||||||
|
# Publish docs only when publishing the latest version
|
||||||
|
if [ "$(git describe --tags `git rev-list --tags --max-count=1`)" = "$GITHUB_REF_NAME" ]; then
|
||||||
# We force recreate the branch in order to always be up to date and avoid merge conflicts within the automated workflow
|
# We force recreate the branch in order to always be up to date and avoid merge conflicts within the automated workflow
|
||||||
git branch -f website
|
git branch -f website
|
||||||
git push -f origin website
|
git push -f origin website
|
||||||
|
fi
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user