Skip to content

Commit

Permalink
adjust docs alias naming
Browse files Browse the repository at this point in the history
  • Loading branch information
trhallam authored Aug 16, 2024
1 parent 68f9e54 commit 7a85c1b
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/mkdocs-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,27 @@ jobs:
python -m pip install --upgrade pip
python -m pip install hatch
- name: Set ENV Vars
- name: Set ENV Vars default
run: |
if [ "${{ env.GITHUB_REF_NAME }}" == "main" ]; then
echo "MIKE_ALIAS=latest" >> $GITHUB_ENV
echo "MKDOCS_VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
else
echo "MIKE_ALIAS=dev" >> $GITHUB_ENV
echo "MKDOCS_VERSION=$(hatch version | grep -Po '.+dev')" >> $GITHUB_ENV
fi
echo "MIKE_ALIAS=dev" >> $GITHUB_ENV
echo "MKDOCS_VERSION=$(hatch version | grep -Po '.+dev')" >> $GITHUB_ENV
echo "BADGE_MSG=fail" >> $GITHUB_ENV
echo "BADGE_COLOUR=red" >> $GITHUB_ENV
- name: Set ENV Vars release
if: ${{ github.ref_type == 'tag' }}
run: |
echo $GITHUB_REF_NAME
echo "MKDOCS_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV
echo "MIKE_ALIAS=${GITHUB_REF_NAME}" >> $GITHUB_ENV
echo $MKDOCS_VERSION $MIKE_ALIAS
echo "BADGE_MSG=fail" >> $GITHUB_ENV
echo "BADGE_COLOUR=red" >> $GITHUB_ENV
- name: Set latest
if: ${{ github.ref_type == 'tag' && !github.event.release.prerelease }}
run: |
echo "MIKE_ALIAS='${MIKE_ALIAS} latest'" >> $GITHUB_ENV
echo $MKDOCS_VERSION $MIKE_ALIAS
- name: Build docs examples
id: build
Expand Down

0 comments on commit 7a85c1b

Please sign in to comment.