Skip to content

Commit

Permalink
fix(nx-dev): publish docs when on the latest tag (nrwl#20182)
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacplmann authored Nov 20, 2023
1 parent 07aff97 commit dc3e140
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,15 @@ jobs:
npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
pnpm nx-release --local=false $GITHUB_REF_NAME
- name: Trigger Docs Release
# Publish docs only on a full release and when publishing the latest version
if: ${{ !github.event.release.prerelease && github.event.release.target_commitish == 'master' }}
# Publish docs only on a full release
if: ${{ !github.event.release.prerelease }}
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
git branch -f website
git push -f origin website
fi
env:
GH_TOKEN: ${{ github.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit dc3e140

Please sign in to comment.