Merge pull request #161 from aai-institute/feature/update-pypi-publis… #139
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Documentation | |
on: | |
push: | |
branches: [main, bugfix/docs*] | |
release: | |
types: [published] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Configure Git Credentials | |
run: | | |
git config user.name github-actions[bot] | |
git config user.email github-actions[bot]@users.noreply.github.com | |
- name: Fetch gh-pages | |
run: | | |
git fetch origin gh-pages:gh-pages | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
cache: "pip" | |
- name: Install | |
run: | | |
pip install ".[dev]" | |
- name: Get Current Version | |
if: ${{ github.event_name == 'release' }} | |
run: | | |
export CURRENT_VERSION=$(bump-my-version show current_version) | |
echo CURRENT_VERSION=$CURRENT_VERSION >> $GITHUB_ENV | |
shell: bash | |
- name: Publish release | |
if: ${{ github.event_name == 'release' }} | |
run: mike deploy --push --update-aliases ${{ env.CURRENT_VERSION }} latest | |
- name: Publish development | |
if: ${{ github.event_name == 'push' }} | |
run: mike deploy --push development |