Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ jobs:
name: Release
runs-on: ubuntu-latest
needs: [checks]
permissions:
contents: write
pages: write
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -207,3 +210,13 @@ jobs:
prerelease: ${{ contains(env.TAG, 'rc') }}
files: |
dist/*

# The docs header reads the version from the latest release, but Pages only
# rebuilds on a push to its branch, and the release lands after that push.
# Ask for a rebuild here so the site picks up the tag we just published.
# Has to live in this job: a release made with GITHUB_TOKEN doesn't fire the
# release event, so a workflow keyed on it would never run.
- name: Rebuild docs site
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh api --method POST repos/${{ github.repository }}/pages/builds
7 changes: 4 additions & 3 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ url: "https://azure.github.io" # the base hostname & protocol for your site, e.g
github:
repo: https://github.com/Azure/aaz-dev-tools

pypi: https://pypi.org/project/aaz-dev/
# Used by jekyll-github-metadata to resolve site.github.* when building outside
# of GitHub Pages. Pages infers it, local builds wont.
repository: Azure/aaz-dev-tools

# TODO: get version number from github
version: v4.6.1
pypi: https://pypi.org/project/aaz-dev/

# Build settings
theme: minima
Expand Down
9 changes: 8 additions & 1 deletion docs/_includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,19 @@
></path></svg
><span class="h4 text-semibold ml-2">GitHub Repo</span></a
>
{% comment %}
Populated from the latest GitHub release. Empty on local builds without
a JEKYLL_GITHUB_TOKEN, so hide the whole block rather than show a blank.
{% endcomment %}
{% assign latest_version = site.github.latest_release.tag_name %}
{% if latest_version %}
<div class="hide-sm border-left">
<div class="pl-2 pr-2">
<span class="color-fg-muted text-normal">Version: </span>
<span>{{ site.version }}</span>
<span>{{ latest_version }}</span>
</div>
</div>
{% endif %}
</div>
</div>
</header>
Loading