Skip to content

Commit

Permalink
fix(ci): Correct versioning of actions (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
devsjc authored Nov 25, 2024
1 parent 1cbf51c commit cf6fee7
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
with:
fetch-depth: 0
- name: Bump version and push tag
uses: RueLaLa/auto-tagger@v2
uses: RueLaLa/auto-tagger@v2.1.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_NUMBER: ${{ github.event.number }}
Expand Down
57 changes: 55 additions & 2 deletions .github/workflows/tagged_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ name: Default Branch SemVer Tagged CI (Python)

on:
push:
branches: ['main']
tags: ['v[0-9]+.[0-9]+.[0-9]+']
paths-ignore: ['README.md']

Expand Down Expand Up @@ -113,7 +112,61 @@ jobs:
path: dist/*.whl

- name: Publish wheel
uses: pypa/gh-action-pypi-publish@v1.10
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

# Define a job that builds the documentation
# * Surfaces the documentation as an artifact
build-docs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "pyproject.toml"

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"

- name: Install editable package and required dependencies
run: uv sync

# Pydoctor is ran to find any linking errors in the docs
- name: Build documentation
run: |
uv run pydoctor --html-output=tmpdocs -W -q
PDOC_ALLOW_EXEC=1 uv run pdoc -o docs \
--docformat=google \
--logo="https://cdn.prod.website-files.com/62d92550f6774db58d441cca/6324a2038936ecda71599a8b_OCF_Logo_black_trans.png" \
src/nwp_consumer
- name: Upload documentation artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/

# Job to deploy the documentation to GitHub pages
deploy-docs:
needs: build-docs
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit cf6fee7

Please sign in to comment.