Skip to content

Commit

Permalink
chore: don't use version in dev documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
wyfo committed Oct 20, 2023
1 parent d38440c commit 1c6f8c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@ jobs:
git config user.name github-actions
git config user.email github-actions@github.com
git fetch origin gh-pages --depth=1
- name: Publish dev documentation
if: github.event_name == 'push'
run: mike deploy -p dev -u
- name: Set environment variable
# TODO use a better thing that `python setup.py`
run: |
echo "version=$(cat pyproject.toml | grep "version =" | cut -d' ' -f3 | cut -d'"' -f2 | cut -d. -f-2)" >> $GITHUB_ENV
echo "revision=$(cat pyproject.toml | grep "version =" | cut -d' ' -f3 | cut -d'"' -f2 | cut -d. -f3)" >> $GITHUB_ENV
echo "latest=$(mike list latest -j | jq .version -r)" >> $GITHUB_ENV
- name: Publish dev documentation
if: github.event_name == 'push' && env.version != env.latest
run: mike deploy -p $version dev -t "dev" -u
- name: Publish latest documentation
if: github.event_name == 'release' && env.revision == '0'
run: |
Expand Down

0 comments on commit 1c6f8c4

Please sign in to comment.