chore: bump version to 0.3.0 #58
Workflow file for this run
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: publish-docs | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '**' | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout gh-pages | |
uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
# check-out repo and set-up python | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Configure Git Credentials | |
run: | | |
git config user.name github-actions[bot] | |
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
- name: Set up python | |
id: setup-python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9" | |
# install & configure poetry | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
# install dependencies if cache does not exist | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --only docs | |
# deploy github pages (dev) | |
- name: Deploy GitHub Pages (dev) | |
if: "github.ref == 'refs/heads/main'" | |
run: poetry run mike deploy -b gh-pages dev --push | |
# deploy github pages (release) | |
- if: startsWith(github.ref, 'refs/tags/') | |
id: check-version | |
uses: samuelcolvin/[email protected] | |
with: | |
version_file_path: 'ecologits/__init__.py' | |
skip_env_check: true | |
- name: Deploy GitHub Pages (release) | |
if: startsWith(github.ref, 'refs/tags/') | |
run: poetry run mike deploy -b gh-pages ${{ steps.check-version.outputs.VERSION_MAJOR_MINOR }} latest --update-aliases --push |